1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-29 19:09:56 +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 CpasbienBridge extends HttpCachingBridgeAbstract{
public $maintainer = "lagaisse";
public $name = "Cpasbien Bridge";
public $uri = "http://www.cpasbien.io";
public $description = "Returns latest torrents from a request query";
const MAINTAINER = "lagaisse";
const NAME = "Cpasbien Bridge";
const URI = "http://www.cpasbien.io";
const DESCRIPTION = "Returns latest torrents from a request query";
public $parameters = array( array(
const PARAMETERS = array( array(
'q'=>array(
'name'=>'Search',
'required'=>true,
@@ -16,7 +16,7 @@ class CpasbienBridge extends HttpCachingBridgeAbstract{
public function collectData(){
$request = str_replace(" ","-",trim($this->getInput('q')));
$html = $this->getSimpleHTMLDOM($this->uri.'/recherche/'.urlencode($request).'.html')
$html = $this->getSimpleHTMLDOM(self::URI.'/recherche/'.urlencode($request).'.html')
or $this->returnServerError('No results for this query.');
foreach ($html->find('#gauche',0)->find('div') as $episode) {
@@ -40,7 +40,7 @@ class CpasbienBridge extends HttpCachingBridgeAbstract{
}
$item['id'] = $episode->find('a', 0)->getAttribute('href');
$item['uri'] = $this->uri . $htmlepisode->find('#telecharger',0)->getAttribute('href');
$item['uri'] = self::URI . $htmlepisode->find('#telecharger',0)->getAttribute('href');
$this->items[] = $item;
}
}
@@ -48,7 +48,7 @@ class CpasbienBridge extends HttpCachingBridgeAbstract{
public function getName(){
return $this->getInput('q').' : '.$this->name;
return $this->getInput('q').' : '.self::NAME;
}
public function getCacheDuration(){