mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-05 10:34:55 +02:00
bridges: Fix default return values and function scopes
getURI and getName should fall back to parent::getURI or parent::getName respectively if it cannot build propper return values. Functions defined by bridges should be made private to prevent confusion with inherited functions
This commit is contained in:
parent
271c71d0ac
commit
95b99d42a4
6 changed files with 34 additions and 19 deletions
|
@ -23,27 +23,36 @@ class AllocineFRBridge extends BridgeAbstract{
|
|||
));
|
||||
|
||||
public function getURI(){
|
||||
switch($this->getInput('category')){
|
||||
case 'faux-raccord':
|
||||
$uri = static::URI.'video/programme-12284/saison-27129/';
|
||||
break;
|
||||
case 'top-5':
|
||||
$uri = static::URI.'video/programme-12299/saison-29561/';
|
||||
break;
|
||||
case 'tueurs-en-serie':
|
||||
$uri = static::URI.'video/programme-12286/saison-22938/';
|
||||
break;
|
||||
if(!is_null($this->getInput('category'))){
|
||||
|
||||
switch($this->getInput('category')){
|
||||
case 'faux-raccord':
|
||||
$uri = static::URI.'video/programme-12284/saison-27129/';
|
||||
break;
|
||||
case 'top-5':
|
||||
$uri = static::URI.'video/programme-12299/saison-29561/';
|
||||
break;
|
||||
case 'tueurs-en-serie':
|
||||
$uri = static::URI.'video/programme-12286/saison-22938/';
|
||||
break;
|
||||
}
|
||||
|
||||
return $uri;
|
||||
}
|
||||
|
||||
return $uri;
|
||||
return parent::getURI();
|
||||
}
|
||||
|
||||
public function getName(){
|
||||
if(!is_null($this->getInput('category'))){
|
||||
return self::NAME.' : '
|
||||
.array_search(
|
||||
$this->getInput('category'),
|
||||
self::PARAMETERS[$this->queriedContext]['category']['values']
|
||||
);
|
||||
}
|
||||
|
||||
return parent::getName();
|
||||
}
|
||||
|
||||
public function collectData(){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue