1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-24 09:02:59 +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 SuperbWallpapersBridge extends BridgeAbstract {
public $maintainer = "nel50n";
public $name = "Superb Wallpapers Bridge";
public $uri = "http://www.superbwallpapers.com/";
public $description = "Returns the latests wallpapers from SuperbWallpapers";
const MAINTAINER = "nel50n";
const NAME = "Superb Wallpapers Bridge";
const URI = "http://www.superbwallpapers.com/";
const DESCRIPTION = "Returns the latests wallpapers from SuperbWallpapers";
public $parameters = array( array(
const PARAMETERS = array( array(
'c'=>array(
'name'=>'category',
'required'=>true
@@ -31,14 +31,14 @@ class SuperbWallpapersBridge extends BridgeAbstract {
$lastpage = 1;
// Get last page number
$link = $this->uri.'/'.$category.'/9999.html';
$link = self::URI.'/'.$category.'/9999.html';
$html = $this->getSimpleHTMLDOM($link)
or $this->returnServerError('Could not load '.$link);
$lastpage = min($html->find('.paging .cpage', 0)->innertext(), ceil($max/36));
for ($page = 1; $page <= $lastpage; $page++) {
$link = $this->uri.'/'.$category.'/'.$page.'.html';
$link = self::URI.'/'.$category.'/'.$page.'.html';
$html = $this->getSimpleHTMLDOM($link)
or $this->returnServerError('No results for this query.');
@@ -60,7 +60,7 @@ class SuperbWallpapersBridge extends BridgeAbstract {
}
public function getName(){
return $this->name .'- '.$this->getInput('c').' ['.$this->getInput('r').']';
return self::NAME .'- '.$this->getInput('c').' ['.$this->getInput('r').']';
}
public function getCacheDuration(){