1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-08 17:46:34 +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,12 +1,12 @@
<?php
class LWNprevBridge extends BridgeAbstract{
public $maintainer = 'Pierre Mazière';
public $name = 'LWN Free Weekly Edition';
public $uri = 'https://lwn.net/';
public $description = 'LWN Free Weekly Edition available one week late';
const MAINTAINER = 'Pierre Mazière';
const NAME = 'LWN Free Weekly Edition';
const URI = 'https://lwn.net/';
const DESCRIPTION = 'LWN Free Weekly Edition available one week late';
function getURI(){
return $this->uri.'free/bigpage';
return self::URI.'free/bigpage';
}
private function jumpToNextTag(&$node){
@@ -48,7 +48,7 @@ class LWNprevBridge extends BridgeAbstract{
break;
}
}
$realURI=$this->uri.$a->getAttribute('href');
$realURI=self::URI.$a->getAttribute('href');
$URICounter=0;
$edition=$html->getElementsByTagName('h1')->item(0)->textContent;
@@ -82,7 +82,7 @@ class LWNprevBridge extends BridgeAbstract{
$h2FirstChild=$h2->firstChild;
$this->jumpToNextTag($h2FirstChild);
if($h2FirstChild->nodeName==='a'){
$item['uri']=$this->uri.$h2FirstChild->getAttribute('href');
$item['uri']=self::URI.$h2FirstChild->getAttribute('href');
}else{
$item['uri']=$realURI.'#'.$URICounter;
}