1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-11 19:14:09 +02:00

[bridges] use constants instead of variable members

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
Pierre Mazière
2016-08-30 11:23:55 +02:00
parent 556b8a2452
commit 9a0da733ef
129 changed files with 834 additions and 834 deletions

View File

@@ -1,20 +1,20 @@
<?php
class EliteDangerousGalnetBridge extends BridgeAbstract
{
public $maintainer = "corenting";
public $name = "Elite: Dangerous Galnet";
public $uri = "https://community.elitedangerous.com/galnet/";
public $description = "Returns the latest page of news from Galnet";
const MAINTAINER = "corenting";
const NAME = "Elite: Dangerous Galnet";
const URI = "https://community.elitedangerous.com/galnet/";
const DESCRIPTION = "Returns the latest page of news from Galnet";
public function collectData()
{
$html = $this->getSimpleHTMLDOM($this->uri)
$html = $this->getSimpleHTMLDOM(self::URI)
or $this->returnServerError('Error while downloading the website content');
foreach($html->find('div.article') as $element) {
$item = array();
$uri = $element->find('h3 a', 0)->href;
$uri = $this->uri . substr($uri,strlen('/galnet/'));
$uri = self::URI . substr($uri,strlen('/galnet/'));
$item['uri'] = $uri;
$title = $element->find('h3 a', 0)->plaintext;