1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-10 18:44:04 +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 PinterestBridge extends BridgeAbstract{
public $maintainer = "pauder";
public $name = "Pinterest Bridge";
public $uri = "http://www.pinterest.com/";
public $description = "Returns the newest images on a board";
const MAINTAINER = "pauder";
const NAME = "Pinterest Bridge";
const URI = "http://www.pinterest.com/";
const DESCRIPTION = "Returns the newest images on a board";
public $parameters = array(
const PARAMETERS = array(
'By username and board' => array(
'u'=>array(
'name'=>'username',
@@ -77,10 +77,10 @@ class PinterestBridge extends BridgeAbstract{
public function getURI(){
switch($this->queriedContext){
case 'By username and board':
$uri = $this->uri.urlencode($this->getInput('u')).'/'.urlencode($this->getInput('b'));
$uri = self::URI.urlencode($this->getInput('u')).'/'.urlencode($this->getInput('b'));
break;
case 'From search':
$uri = $this->uri.'search/?q='.urlencode($this->getInput('q'));
$uri = self::URI.'search/?q='.urlencode($this->getInput('q'));
break;
}
@@ -96,6 +96,6 @@ class PinterestBridge extends BridgeAbstract{
$specific = $this->getInput('q');
break;
}
return $specific .' - '.$this->name;
return $specific .' - '.self::NAME;
}
}