Merge pull request #1 from griffaurel/Bridge_setExtrainfos

Bridge GetExtraInfos
This commit is contained in:
Badet Aurélien 2016-11-18 15:32:36 +01:00 committed by GitHub
commit 58dabc9c98
2 changed files with 10 additions and 7 deletions

View File

@ -159,13 +159,9 @@ try {
// Data transformation // Data transformation
try { try {
$format = Format::create($format); $format = Format::create($format);
$format $format->setItems($bridge->getItems());
->setItems($bridge->getItems()) $format->setExtraInfos($bridge->getExtraInfos());
->setExtraInfos(array( $format->display();
'name' => $bridge->getName(),
'uri' => $bridge->getURI(),
))
->display();
} catch(Exception $e){ } catch(Exception $e){
echo "The bridge has crashed. You should report this to the bridges maintainer"; echo "The bridge has crashed. You should report this to the bridges maintainer";
} }

View File

@ -195,6 +195,13 @@ abstract class BridgeAbstract implements BridgeInterface {
return static::URI; return static::URI;
} }
public function getExtraInfos(){
$ExtraInfos = array();
$ExtraInfos->'name'= getName();
$ExtraInfos->'uri'= getURI();
return $ExtraInfos;
}
public function setCache(\CacheInterface $cache){ public function setCache(\CacheInterface $cache){
$this->cache = $cache; $this->cache = $cache;
} }