[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,19 +1,19 @@
<?php
class ProjectMGameBridge extends BridgeAbstract{
public $maintainer = "corenting";
public $name = "Project M Game Bridge";
public $uri = "http://projectmgame.com/en/";
public $description = "Returns the newest articles.";
const MAINTAINER = "corenting";
const NAME = "Project M Game Bridge";
const URI = "http://projectmgame.com/en/";
const DESCRIPTION = "Returns the newest articles.";
public function collectData(){
$html = $this->getSimpleHTMLDOM($this->uri)
$html = $this->getSimpleHTMLDOM(self::URI)
or $this->returnServerError('Error while downloading the Project M homepage');
foreach($html->find('article') as $article) {
$item = array();
$item['uri'] = $this->uri.$article->find('section div.info_block a',0)->href;
$item['uri'] = self::URI.$article->find('section div.info_block a',0)->href;
$item['title'] = $article->find('h1 p',0)->innertext;
$p_list = $article->find('section p');