Première version du nouveau système de méta-données.

Voir exemple dans YoutubeBridge.
This commit is contained in:
teromene 2015-11-01 11:17:36 +00:00 committed by Mitsukarenai
parent e9e7a421ff
commit 2deef45867
3 changed files with 150 additions and 83 deletions

View file

@ -9,12 +9,28 @@ interface BridgeInterface{
public function getName();
public function getURI();
public function getCacheDuration();
public function loadMetadatas();
}
abstract class BridgeAbstract implements BridgeInterface{
protected $cache;
protected $items = array();
public $name = "Bridge sans nom";
public $homepage = "";
public $description = 'No description provided';
public $maintainer = 'No maintainer';
public $parameters = array();
/**
* Loads the Bridge Metadatas
*/
public function loadMetadatas() {
}
/**
* Launch probative exception
*/
@ -30,6 +46,8 @@ abstract class BridgeAbstract implements BridgeInterface{
return $this->items;
}
/**
* Defined datas with parameters depending choose bridge
* Note : you can defined a cache before with "setCache"