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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user