mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-30 14:49:53 +02:00
core: Use methods to access bridge information
Bridge information were exposed and accessed via public constants which doesn't work if you want to generate bridges dynamically as discussed in #402
This commit is contained in:
parent
c44fb25845
commit
d93d491d8e
3 changed files with 47 additions and 17 deletions
|
@ -21,7 +21,7 @@ abstract class BridgeAbstract implements BridgeInterface {
|
|||
*/
|
||||
public function getCachable(){
|
||||
return array(
|
||||
'items' => $this->getItems(),
|
||||
'items' => $this->getItems(),
|
||||
'extraInfos' => $this->getExtraInfos()
|
||||
);
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ abstract class BridgeAbstract implements BridgeInterface {
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets the input values for a given context. Existing values are
|
||||
* Sets the input values for a given context. Existing values are
|
||||
* overwritten.
|
||||
*
|
||||
* @param array $inputs Associative array of inputs
|
||||
|
@ -228,17 +228,29 @@ abstract class BridgeAbstract implements BridgeInterface {
|
|||
return $this->inputs[$this->queriedContext][$input]['value'];
|
||||
}
|
||||
|
||||
public function getDescription(){
|
||||
return static::DESCRIPTION;
|
||||
}
|
||||
|
||||
public function getMaintainer(){
|
||||
return static::MAINTAINER;
|
||||
}
|
||||
|
||||
public function getName(){
|
||||
return static::NAME;
|
||||
}
|
||||
|
||||
public function getParameters(){
|
||||
return static::PARAMETERS;
|
||||
}
|
||||
|
||||
public function getURI(){
|
||||
return static::URI;
|
||||
}
|
||||
|
||||
public function getExtraInfos(){
|
||||
return array(
|
||||
'name' => $this->getName(),
|
||||
'name' => $this->getName(),
|
||||
'uri' => $this->getURI()
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue