[bridges] migrate all bridges to an array based definition of parameters

see github issue 356

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
Pierre Mazière 2016-08-22 01:25:56 +02:00
parent 2f09ae56ad
commit f0e502ce37
79 changed files with 1381 additions and 2316 deletions

View file

@ -9,40 +9,33 @@ class SensCritiqueBridge extends BridgeAbstract {
$this->uri = "http://www.senscritique.com";
$this->description = "Sens Critique news";
$this->parameters[] =
'[
{
"name" : "Movies",
"identifier" : "m",
"type": "checkbox"
},
{
"name" : "Series",
"identifier" : "s",
"type": "checkbox"
},
{
"name" : "Video Games",
"identifier" : "g",
"type": "checkbox"
},
{
"name" : "Books",
"identifier" : "b",
"type": "checkbox"
},
{
"name" : "BD",
"identifier" : "bd",
"type": "checkbox"
},
{
"name" : "Music",
"identifier" : "mu",
"type": "checkbox"
}
]';
}
$this->parameters[] = array(
'm'=>array(
'name'=>'Movies',
'type'=>'checkbox'
),
's'=>array(
'name'=>'Series',
'type'=>'checkbox'
),
'g'=>array(
'name'=>'Video Games',
'type'=>'checkbox'
),
'b'=>array(
'name'=>'Books',
'type'=>'checkbox'
),
'bd'=>array(
'name'=>'BD',
'type'=>'checkbox'
),
'mu'=>array(
'name'=>'Music',
'type'=>'checkbox'
)
);
}
public function collectData(array $param) {
if ((isset($param['m']) && $param['m'])) {