Browse Source

[core] store parameters values in BridgeAbstract::parameters

This way, any BridgeAbstract method can now have access to these values,
no only collectData

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
Pierre Mazière 7 years ago
parent
commit
117031bf0f
100 changed files with 355 additions and 299 deletions
  1. 1 1
      bridges/ABCTabsBridge.php
  2. 2 1
      bridges/AcrimedBridge.php
  3. 4 3
      bridges/AllocineFRBridge.php
  4. 5 4
      bridges/AnimeUltimeBridge.php
  5. 1 1
      bridges/ArstechnicaBridge.php
  6. 6 5
      bridges/Arte7Bridge.php
  7. 4 3
      bridges/AskfmBridge.php
  8. 4 3
      bridges/BandcampBridge.php
  9. 1 1
      bridges/BastaBridge.php
  10. 1 1
      bridges/BlaguesDeMerdeBridge.php
  11. 10 9
      bridges/BooruprojectBridge.php
  12. 1 1
      bridges/CADBridge.php
  13. 4 3
      bridges/CNETBridge.php
  14. 6 5
      bridges/CastorusBridge.php
  15. 1 1
      bridges/CollegeDeFranceBridge.php
  16. 1 1
      bridges/CommonDreamsBridge.php
  17. 1 1
      bridges/CopieDoubleBridge.php
  18. 1 1
      bridges/CourrierInternationalBridge.php
  19. 4 3
      bridges/CpasbienBridge.php
  20. 4 3
      bridges/CryptomeBridge.php
  21. 8 7
      bridges/DailymotionBridge.php
  22. 6 5
      bridges/DanbooruBridge.php
  23. 1 1
      bridges/DansTonChatBridge.php
  24. 4 3
      bridges/DauphineLibereBridge.php
  25. 1 1
      bridges/DemoBridge.php
  26. 1 1
      bridges/DeveloppezDotComBridge.php
  27. 1 1
      bridges/DilbertBridge.php
  28. 6 5
      bridges/DollbooruBridge.php
  29. 3 2
      bridges/DuckDuckGoBridge.php
  30. 4 3
      bridges/EZTVBridge.php
  31. 1 1
      bridges/EliteDangerousGalnetBridge.php
  32. 4 3
      bridges/ElsevierBridge.php
  33. 1 1
      bridges/EstCeQuonMetEnProdBridge.php
  34. 9 8
      bridges/FacebookBridge.php
  35. 1 1
      bridges/FierPandaBridge.php
  36. 1 1
      bridges/FlickrExploreBridge.php
  37. 6 5
      bridges/FlickrTagBridge.php
  38. 1 1
      bridges/FootitoBridge.php
  39. 4 3
      bridges/FourchanBridge.php
  40. 2 1
      bridges/FreenewsBridge.php
  41. 5 4
      bridges/FuturaSciencesBridge.php
  42. 5 4
      bridges/GBAtempBridge.php
  43. 5 4
      bridges/GawkerBridge.php
  44. 6 5
      bridges/GelbooruBridge.php
  45. 7 6
      bridges/GiphyBridge.php
  46. 5 4
      bridges/GithubIssueBridge.php
  47. 8 7
      bridges/GitlabCommitsBridge.php
  48. 1 1
      bridges/GizmodoFRBridge.php
  49. 3 3
      bridges/GooglePlusPostBridge.php
  50. 4 3
      bridges/GoogleSearchBridge.php
  51. 1 1
      bridges/GuruMedBridge.php
  52. 5 4
      bridges/HDWallpapersBridge.php
  53. 1 1
      bridges/HentaiHavenBridge.php
  54. 5 4
      bridges/IdenticaBridge.php
  55. 4 3
      bridges/InstagramBridge.php
  56. 12 11
      bridges/IsoHuntBridge.php
  57. 3 2
      bridges/JapanExpoBridge.php
  58. 6 5
      bridges/KonachanBridge.php
  59. 1 1
      bridges/KoreusBridge.php
  60. 6 5
      bridges/KununuBridge.php
  61. 1 1
      bridges/LWNprevBridge.php
  62. 5 4
      bridges/LeBonCoinBridge.php
  63. 1 1
      bridges/LeJournalDuGeekBridge.php
  64. 1 1
      bridges/LeMondeInformatiqueBridge.php
  65. 2 1
      bridges/Les400CulsBridge.php
  66. 1 1
      bridges/LesJoiesDuCodeBridge.php
  67. 1 1
      bridges/LichessBridge.php
  68. 3 2
      bridges/LinkedInCompany.php
  69. 6 5
      bridges/LolibooruBridge.php
  70. 9 8
      bridges/MangareaderBridge.php
  71. 6 5
      bridges/MilbooruBridge.php
  72. 1 1
      bridges/MondeDiploBridge.php
  73. 1 1
      bridges/MsnMondeBridge.php
  74. 6 5
      bridges/MspabooruBridge.php
  75. 1 1
      bridges/NakedSecurityBridge.php
  76. 1 1
      bridges/NasaApodBridge.php
  77. 1 1
      bridges/NeuviemeArtBridge.php
  78. 1 1
      bridges/NextInpactBridge.php
  79. 3 2
      bridges/NextgovBridge.php
  80. 1 1
      bridges/NiceMatinBridge.php
  81. 4 3
      bridges/NovelUpdatesBridge.php
  82. 1 1
      bridges/NumeramaBridge.php
  83. 4 3
      bridges/OpenClassroomsBridge.php
  84. 11 11
      bridges/ParuVenduImmoBridge.php
  85. 7 6
      bridges/PickyWallpapersBridge.php
  86. 9 8
      bridges/PinterestBridge.php
  87. 1 1
      bridges/PlanetLibreBridge.php
  88. 1 1
      bridges/ProjectMGameBridge.php
  89. 4 3
      bridges/RTBFBridge.php
  90. 1 1
      bridges/Releases3DSBridge.php
  91. 1 1
      bridges/ReporterreBridge.php
  92. 1 1
      bridges/Rue89Bridge.php
  93. 6 5
      bridges/Rule34Bridge.php
  94. 6 5
      bridges/Rule34pahealBridge.php
  95. 6 5
      bridges/SafebooruBridge.php
  96. 6 5
      bridges/SakugabooruBridge.php
  97. 1 1
      bridges/ScmbBridge.php
  98. 4 3
      bridges/ScoopItBridge.php
  99. 8 7
      bridges/SensCritiqueBridge.php
  100. 1 1
      bridges/Sexactu.php

+ 1 - 1
bridges/ABCTabsBridge.php

@@ -12,7 +12,7 @@ class ABCTabsBridge extends BridgeAbstract{
 
 	}
 
-	public function collectData(array $param){
+	public function collectData(){
 		$html = '';
         $html = $this->getSimpleHTMLDOM('http://www.abc-tabs.com/tablatures/nouveautes.html') or $this->returnClientError('No results for this query.');
 		$table = $html->find('table#myTable', 0)->children(1);

+ 2 - 1
bridges/AcrimedBridge.php

@@ -10,7 +10,8 @@ class AcrimedBridge extends RssExpander{
 
 		}
 
-       public function collectData(array $param){
+       public function collectData(){
+        $param=$this->parameters[$this->queriedContext];
 
 			parent::collectExpandableDatas($param, "http://www.acrimed.org/spip.php?page=backend");
 

+ 4 - 3
bridges/AllocineFRBridge.php

@@ -24,14 +24,15 @@ class AllocineFRBridge extends BridgeAbstract{
         );
     }
 
-    public function collectData(array $params){
+    public function collectData(){
+        $params=$this->parameters[$this->queriedContext];
 
         // Check all parameters
-        if(!isset($params['category']))
+        if(!isset($params['category']['value']))
             $this->returnClientError('You must specify a valid category (&category= )!');
 
         $category = '';
-        switch($params['category']){
+        switch($params['category']['value']){
             case 'faux-raccord':
                 $this->uri = 'http://www.allocine.fr/video/programme-12284/saison-24580/';
                 $category = 'Faux Raccord';

+ 5 - 4
bridges/AnimeUltimeBridge.php

@@ -24,13 +24,14 @@ class AnimeUltimeBridge extends BridgeAbstract {
         );
     }
 
-    public function collectData(array $param) {
+    public function collectData(){
+        $param=$this->parameters[$this->queriedContext];
 
         //Add type filter if provided
         $typeFilter = '';
-        if (!empty($param['type'])) {
-            if ($param['type'] == 'A' || $param['type'] == 'D' || $param['type'] == 'T') {
-                $typeFilter = $param['type'];
+        if (!empty($param['type']['value'])) {
+            if ($param['type']['value'] == 'A' || $param['type']['value'] == 'D' || $param['type']['value'] == 'T') {
+                $typeFilter = $param['type']['value'];
                 if ($typeFilter == 'A') { $this->filter = 'Anime'; }
                 if ($typeFilter == 'D') { $this->filter = 'Drama'; }
                 if ($typeFilter == 'T') { $this->filter = 'Tokusatsu'; }

+ 1 - 1
bridges/ArstechnicaBridge.php

@@ -42,7 +42,7 @@ class ArstechnicaBridge extends BridgeAbstract {
     return $text;
   }
 
-  public function collectData(array $param) {
+  public function collectData(){
 
     $html = $this->getSimpleHTMLDOM('http://feeds.arstechnica.com/arstechnica/index') or $this->returnServerError('Could not request NextInpact.');
     $limit = 0;

+ 6 - 5
bridges/Arte7Bridge.php

@@ -61,13 +61,14 @@ class Arte7Bridge extends BridgeAbstract{
         return $input;
     }
 
-    public function collectData(array $param){
+    public function collectData(){
+        $param=$this->parameters[$this->queriedContext];
 
       $category='toutes-les-videos'; $lang='fr';
-      if (!empty($param['catfr']))
-         $category=$param['catfr'];
-      if (!empty($param['catde']))
-         { $category=$param['catde']; $lang='de'; }
+      if (!empty($param['catfr']['value']))
+         $category=$param['catfr']['value'];
+      if (!empty($param['catde']['value']))
+         { $category=$param['catde']['value']; $lang='de'; }
       $input_json = $this->extractVideoset($category, $lang);
 
       foreach($input_json['videos'] as $element) {

+ 4 - 3
bridges/AskfmBridge.php

@@ -16,10 +16,11 @@ class AskfmBridge extends BridgeAbstract{
                 );
         }
 
-    public function collectData(array $param){
+    public function collectData(){
+        $param=$this->parameters[$this->queriedContext];
         $html = '';
-        if (isset($param['u'])) {
-            $this->request = $param['u'];
+        if (isset($param['u']['value'])) {
+            $this->request = $param['u']['value'];
             $html = $this->getSimpleHTMLDOM('http://ask.fm/'.urlencode($this->request).'/answers/more?page=0') or $this->returnServerError('Requested username can\'t be found.');
         }
         else {

+ 4 - 3
bridges/BandcampBridge.php

@@ -18,10 +18,11 @@ class BandcampBridge extends BridgeAbstract{
         );
 	}
 
-    public function collectData(array $param){
+    public function collectData(){
+        $param=$this->parameters[$this->queriedContext];
         $html = '';
-        if (isset($param['tag'])) {
-            $this->request = $param['tag'];
+        if (isset($param['tag']['value'])) {
+            $this->request = $param['tag']['value'];
             $html = $this->getSimpleHTMLDOM('http://bandcamp.com/tag/'.urlencode($this->request).'?sort_field=date') or $this->returnServerError('No results for this query.');
         }
         else {

+ 1 - 1
bridges/BastaBridge.php

@@ -7,7 +7,7 @@ class BastaBridge extends BridgeAbstract{
 		$this->description = "Returns the newest articles.";
 	}
 
-	public function collectData(array $param){
+	public function collectData(){
 		// Replaces all relative image URLs by absolute URLs. Relative URLs always start with 'local/'!
 		function ReplaceImageUrl($content){
 			return preg_replace('/src=["\']{1}([^"\']+)/ims', 'src=\'http://www.bastamag.net/$1\'', $content);

+ 1 - 1
bridges/BlaguesDeMerdeBridge.php

@@ -10,7 +10,7 @@ class BlaguesDeMerdeBridge extends BridgeAbstract{
 
 	}
 
-    public function collectData(array $param){
+    public function collectData(){
         $html = $this->getSimpleHTMLDOM('http://www.blaguesdemerde.fr/') or $this->returnServerError('Could not request BDM.');
 
         foreach($html->find('article.joke_contener') as $element) {

+ 10 - 9
bridges/BooruprojectBridge.php

@@ -19,29 +19,30 @@ class BooruprojectBridge extends BridgeAbstract{
 	}
 
 
-    public function collectData(array $param){
+    public function collectData(){
+        $param=$this->parameters[$this->queriedContext];
 	$page = 0; $tags = '';
-        if (!empty($param['p'])) {
-		$page = (int)preg_replace("/[^0-9]/",'', $param['p']);
+        if (!empty($param['p']['value'])) {
+		$page = (int)preg_replace("/[^0-9]/",'', $param['p']['value']);
 		$page = $page - 1;
 		$page = $page * 20;
         }
-        if (!empty($param['t'])) {
-            $tags = '&tags='.urlencode($param['t']);
+        if (!empty($param['t']['value'])) {
+            $tags = '&tags='.urlencode($param['t']['value']);
         }
-	if (empty($param['i'])) {
+	if (empty($param['i']['value'])) {
 		$this->returnServerError('Please enter a ***.booru.org instance.');
 	}
-        $html = $this->getSimpleHTMLDOM("http://".$param['i'].".booru.org/index.php?page=post&s=list&pid=".$page.$tags) or $this->returnServerError('Could not request Booruproject.');
+        $html = $this->getSimpleHTMLDOM("http://".$param['i']['value'].".booru.org/index.php?page=post&s=list&pid=".$page.$tags) or $this->returnServerError('Could not request Booruproject.');
 
 
 	foreach($html->find('div[class=content] span') as $element) {
 		$item = array();
-		$item['uri'] = 'http://'.$param['i'].'.booru.org/'.$element->find('a', 0)->href;
+		$item['uri'] = 'http://'.$param['i']['value'].'.booru.org/'.$element->find('a', 0)->href;
 		$item['postid'] = (int)preg_replace("/[^0-9]/",'', $element->find('a', 0)->getAttribute('id'));
 		$item['timestamp'] = time();
 		$item['tags'] = $element->find('img', 0)->getAttribute('title');
-		$item['title'] = 'Booruproject '.$param['i'].' | '.$item['postid'];
+		$item['title'] = 'Booruproject '.$param['i']['value'].' | '.$item['postid'];
 		$item['content'] = '<a href="' . $item['uri'] . '"><img src="' . $element->find('img', 0)->src . '" /></a><br>Tags: '.$item['tags'];
 		$this->items[] = $item;
 	}

+ 1 - 1
bridges/CADBridge.php

@@ -34,7 +34,7 @@ class CADBridge extends BridgeAbstract{
 		return '<img src="'.$img.'"/>';
 	}
 
-	public function collectData(array $param){
+	public function collectData(){
 		function CADUrl($string) {
 			$html2 = explode("\"", $string);
 			$string = $html2[1];

+ 4 - 3
bridges/CNETBridge.php

@@ -15,7 +15,8 @@ class CNETBridge extends BridgeAbstract {
         );
     }
 
-    public function collectData(array $param) {
+    public function collectData(){
+        $param=$this->parameters[$this->queriedContext];
 
         function ExtractFromDelimiters($string, $start, $end) {
             if (strpos($string, $start) !== false) {
@@ -42,8 +43,8 @@ class CNETBridge extends BridgeAbstract {
             return $article_html;
         }
 
-        if (!empty($param['topic']))
-            $this->topicName = $param['topic'];
+        if (!empty($param['topic']['value']))
+            $this->topicName = $param['topic']['value'];
 
         $pageUrl = 'http://www.cnet.com/'.(empty($this->topicName) ? '' : 'topics/'.$this->topicName.'/');
         $html = $this->getSimpleHTMLDOM($pageUrl) or $this->returnServerError('Could not request CNET: '.$pageUrl);

+ 6 - 5
bridges/CastorusBridge.php

@@ -73,12 +73,13 @@ class CastorusBridge extends BridgeAbstract {
 		return $price->innertext;
 	}
 
-	public function collectData(array $params){
-		if(isset($params['zip']))
-			$zip_filter = trim($params['zip']);
+	public function collectData(){
+        $params=$this->parameters[$this->queriedContext];
+		if(isset($params['zip']['value']))
+			$zip_filter = trim($params['zip']['value']);
 
-		if(isset($params['city']))
-			$city_filter = trim($params['city']);
+		if(isset($params['city']['value']))
+			$city_filter = trim($params['city']['value']);
 
 		$html = $this->getSimpleHTMLDOM($this->uri);
 

+ 1 - 1
bridges/CollegeDeFranceBridge.php

@@ -8,7 +8,7 @@ class CollegeDeFranceBridge extends BridgeAbstract{
 		$this->description = "Returns the latest audio and video from CollegeDeFrance";
 	}
 
-	public function collectData(array $param) {
+	public function collectData(){
 		$months = array(
 			'01' => 'janv.',
 			'02' => 'févr.',

+ 1 - 1
bridges/CommonDreamsBridge.php

@@ -16,7 +16,7 @@ class CommonDreamsBridge extends BridgeAbstract{
 		return $text;
 	}
 
-	public function collectData(array $param){
+	public function collectData(){
 
 		function CommonDreamsUrl($string) {
 			$html2 = explode(" ", $string);

+ 1 - 1
bridges/CopieDoubleBridge.php

@@ -11,7 +11,7 @@ class CopieDoubleBridge extends BridgeAbstract{
 	}
 
 
-    public function collectData(array $param){
+    public function collectData(){
         $html = $this->getSimpleHTMLDOM('http://www.copie-double.com/') or $this->returnServerError('Could not request CopieDouble.');
         $table = $html->find('table table', 2);
 

+ 1 - 1
bridges/CourrierInternationalBridge.php

@@ -10,7 +10,7 @@ class CourrierInternationalBridge extends BridgeAbstract{
 
 	}
 
-    public function collectData(array $param){
+    public function collectData(){
 
         $html = '';
 

+ 4 - 3
bridges/CpasbienBridge.php

@@ -21,11 +21,12 @@ class CpasbienBridge extends HttpCachingBridgeAbstract{
 	}
 
 
-    public function collectData(array $param){
+    public function collectData(){
+        $param=$this->parameters[$this->queriedContext];
         $this->loadMetadatas();
         $html = '';
-        if (isset($param['q'])) {   /* keyword search mode */
-            $this->request = str_replace(" ","-",trim($param['q']));
+        if (isset($param['q']['value'])) {   /* keyword search mode */
+            $this->request = str_replace(" ","-",trim($param['q']['value']));
             $html = $this->getSimpleHTMLDOM($this->uri.'/recherche/'.urlencode($this->request).'.html') or $this->returnServerError('No results for this query.');
         }
         else {

+ 4 - 3
bridges/CryptomeBridge.php

@@ -18,7 +18,8 @@ class CryptomeBridge extends BridgeAbstract{
 	}
 
 
-    public function collectData(array $param){
+    public function collectData(){
+        $param=$this->parameters[$this->queriedContext];
         $html = '';
         $num = 20;
         $link = 'http://cryptome.org/';
@@ -26,8 +27,8 @@ class CryptomeBridge extends BridgeAbstract{
         //$link = 'https://secure.netsolhost.com/cryptome.org/';
 
         $html = $this->getSimpleHTMLDOM($link) or $this->returnServerError('Could not request Cryptome.');
-        if (!empty($param['n'])) {   /* number of documents */
-            $num = min(max(1, $param['n']+0), $num);
+        if (!empty($param['n']['value'])) {   /* number of documents */
+            $num = min(max(1, $param['n']['value']+0), $num);
         }
 
 

+ 8 - 7
bridges/DailymotionBridge.php

@@ -45,21 +45,22 @@ class DailymotionBridge extends BridgeAbstract{
       return $metadata;
     }
 
-	public function collectData(array $param){
+	public function collectData(){
+        $param=$this->parameters[$this->queriedContext];
         	$html = '';
 		$limit = 5;
 		$count = 0;
 
-		if (isset($param['u'])) {   // user timeline mode
-			$this->request = $param['u'];
+		if (isset($param['u']['value'])) {   // user timeline mode
+			$this->request = $param['u']['value'];
 			$html = $this->getSimpleHTMLDOM('http://www.dailymotion.com/user/'.urlencode($this->request).'/1') or $this->returnServerError('Could not request Dailymotion.');
 		}
-		else if (isset($param['p'])) {    // playlist mode
-			$this->request = strtok($param['p'], '_');
+		else if (isset($param['p']['value'])) {    // playlist mode
+			$this->request = strtok($param['p']['value'], '_');
 			$html = $this->getSimpleHTMLDOM('http://www.dailymotion.com/playlist/'.urlencode($this->request).'') or $this->returnServerError('Could not request Dailymotion.');
 		}
-		else if (isset($param['s'])) {   // search mode
-			$this->request = $param['s']; $page = 1; if (isset($param['pa'])) $page = (int)preg_replace("/[^0-9]/",'', $param['pa']);
+		else if (isset($param['s']['value'])) {   // search mode
+			$this->request = $param['s']['value']; $page = 1; if (isset($param['pa']['value'])) $page = (int)preg_replace("/[^0-9]/",'', $param['pa']['value']);
 			$html = $this->getSimpleHTMLDOM('http://www.dailymotion.com/search/'.urlencode($this->request).'/'.$page.'') or $this->returnServerError('Could not request Dailymotion.');
 		}
 		else {

+ 6 - 5
bridges/DanbooruBridge.php

@@ -14,13 +14,14 @@ class DanbooruBridge extends BridgeAbstract{
         );
 	}
 
-    public function collectData(array $param){
+    public function collectData(){
+        $param=$this->parameters[$this->queriedContext];
 	$page = 1;$tags='';
-        if (isset($param['p'])) {
-            $page = (int)preg_replace("/[^0-9]/",'', $param['p']);
+        if (isset($param['p']['value'])) {
+            $page = (int)preg_replace("/[^0-9]/",'', $param['p']['value']);
         }
-        if (isset($param['t'])) {
-            $tags = urlencode($param['t']);
+        if (isset($param['t']['value'])) {
+            $tags = urlencode($param['t']['value']);
         }
         $html = $this->getSimpleHTMLDOM("http://donmai.us/posts?&page=$page&tags=$tags") or $this->returnServerError('Could not request Danbooru.');
 	foreach($html->find('div[id=posts] article') as $element) {

+ 1 - 1
bridges/DansTonChatBridge.php

@@ -10,7 +10,7 @@ class DansTonChatBridge extends BridgeAbstract{
 
 	}
 
-    public function collectData(array $param){
+    public function collectData(){
         $html = '';
         $link = 'http://danstonchat.com/latest.html';
 

+ 4 - 3
bridges/DauphineLibereBridge.php

@@ -40,7 +40,8 @@ class DauphineLibereBridge extends BridgeAbstract {
 		return $text;
 	}
 
-	public function collectData(array $param){
+	public function collectData(){
+        $param=$this->parameters[$this->queriedContext];
 
 		// Simulate Mozilla user-agent to fix error 403 (Forbidden)
 		$opts = array('http' =>
@@ -52,8 +53,8 @@ class DauphineLibereBridge extends BridgeAbstract {
 
 		$context = stream_context_create($opts);
 
-		if (isset($param['u'])) { /* user timeline mode */
-			$this->request = $param['u'];
+		if (isset($param['u']['value'])) { /* user timeline mode */
+			$this->request = $param['u']['value'];
 			$html = $this->getSimpleHTMLDOM('http://www.ledauphine.com/'.$this->request.'/rss',false,$context) or $this->returnServerError('Could not request DauphineLibere.');
 		}
 		else {

+ 1 - 1
bridges/DemoBridge.php

@@ -35,7 +35,7 @@ class DemoBridge extends BridgeAbstract{
         );
 	}
 
-	public function collectData(array $param){
+	public function collectData(){
 
 		$item = array();
 	    $item['author'] = "Me!";

+ 1 - 1
bridges/DeveloppezDotComBridge.php

@@ -40,7 +40,7 @@ class DeveloppezDotComBridge extends BridgeAbstract{
 		return trim($text);
 	}
 
-	public function collectData(array $param){
+	public function collectData(){
 		$rssFeed = $this->getSimpleHTMLDOM('http://www.developpez.com/index/rss') or $this->returnServerError('Could not request http://www.developpez.com/index/rss');
 		$limit = 0;
 

+ 1 - 1
bridges/DilbertBridge.php

@@ -10,7 +10,7 @@ class DilbertBridge extends BridgeAbstract {
 
     }
 
-    public function collectData(array $param) {
+    public function collectData(){
 
         $html = $this->getSimpleHTMLDOM($this->getURI()) or $this->returnServerError('Could not request Dilbert: '.$this->getURI());
 

+ 6 - 5
bridges/DollbooruBridge.php

@@ -18,13 +18,14 @@ class DollbooruBridge extends BridgeAbstract{
         );
 	}
 
-    public function collectData(array $param){
+    public function collectData(){
+        $param=$this->parameters[$this->queriedContext];
 	$page = 0;$tags='';
-        if (isset($param['p'])) {
-            $page = (int)preg_replace("/[^0-9]/",'', $param['p']);
+        if (isset($param['p']['value'])) {
+            $page = (int)preg_replace("/[^0-9]/",'', $param['p']['value']);
         }
-        if (isset($param['t'])) {
-            $tags = urlencode($param['t']);
+        if (isset($param['t']['value'])) {
+            $tags = urlencode($param['t']['value']);
         }
         $html = $this->getSimpleHTMLDOM("http://dollbooru.org/post/list/$tags/$page") or $this->returnServerError('Could not request Dollbooru.');
 

+ 3 - 2
bridges/DuckDuckGoBridge.php

@@ -15,9 +15,10 @@ class DuckDuckGoBridge extends BridgeAbstract{
         );
 	}
 
-    public function collectData(array $param){
+    public function collectData(){
+        $param=$this->parameters[$this->queriedContext];
         $html = '';
-        $link = 'http://duckduckgo.com/html/?q='.$param['u'].'+sort:date';
+        $link = 'http://duckduckgo.com/html/?q='.$param['u']['value'].'+sort:date';
 
         $html = $this->getSimpleHTMLDOM($link) or $this->returnServerError('Could not request DuckDuckGo.');
 

+ 4 - 3
bridges/EZTVBridge.php

@@ -17,7 +17,8 @@ class EZTVBridge extends BridgeAbstract{
         );
 	}
 
-	public function collectData(array $param){
+	public function collectData(){
+        $param=$this->parameters[$this->queriedContext];
 
         // Make timestamp from relative released time in table
         function makeTimestamp($relativeReleaseTime){
@@ -33,11 +34,11 @@ class EZTVBridge extends BridgeAbstract{
         }
 
         // Check for ID provided
-        if (!isset($param['i']))
+        if (!isset($param['i']['value']))
 			$this->returnClientError('You must provide a list of ID (?i=showID1,showID2,...)');
 
         // Loop on show ids
-        $showList = explode(",",$param['i']);
+        $showList = explode(",",$param['i']['value']);
         foreach($showList as $showID){
 
             // Get show page

+ 1 - 1
bridges/EliteDangerousGalnetBridge.php

@@ -10,7 +10,7 @@ class EliteDangerousGalnetBridge extends BridgeAbstract
 		$this->description = "Returns the latest page of news from Galnet";
 	}
 
-	public function collectData(array $param)
+	public function collectData()
 	{
 		$html = $this->getSimpleHTMLDOM('https://community.elitedangerous.com/galnet') or $this->returnServerError('Error while downloading the website content');
 		foreach($html->find('div.article') as $element) {

+ 4 - 3
bridges/ElsevierBridge.php

@@ -58,9 +58,10 @@ class ElsevierBridge extends BridgeAbstract{
 		return '';
 	}
 
-	public function collectData(array $param){
-		$uri = 'http://www.journals.elsevier.com/' . $param['j'] . '/recent-articles/';
-		$html = $this->getSimpleHTMLDOM($uri) or $this->returnServerError('No results for Elsevier journal '.$param['j']);
+	public function collectData(){
+        $param=$this->parameters[$this->queriedContext];
+		$uri = 'http://www.journals.elsevier.com/' . $param['j']['value'] . '/recent-articles/';
+		$html = $this->getSimpleHTMLDOM($uri) or $this->returnServerError('No results for Elsevier journal '.$param['j']['value']);
 
 		foreach($html->find('.pod-listing') as $article){
 			$item = array();

+ 1 - 1
bridges/EstCeQuonMetEnProdBridge.php

@@ -8,7 +8,7 @@ class EstCeQuonMetEnProdBridge extends BridgeAbstract {
         $this->description = 'Should we put a website in production today? (French)';
     }
 
-    public function collectData(array $param) {
+    public function collectData(){
         function ExtractFromDelimiters($string, $start, $end) {
             if (strpos($string, $start) !== false) {
                 $section_retrieved = substr($string, strpos($string, $start) + strlen($start));

+ 9 - 8
bridges/FacebookBridge.php

@@ -16,7 +16,8 @@ class FacebookBridge extends BridgeAbstract{
         );
 	}
 
-	public function collectData(array $param) {
+	public function collectData(){
+        $param=$this->parameters[$this->queriedContext];
 
 		//Extract a string using start and end delimiters
 		function ExtractFromDelimiters($string, $start, $end) {
@@ -104,11 +105,11 @@ class FacebookBridge extends BridgeAbstract{
 
 		//Retrieve page contents
 		if (is_null($html)) {
-			if (isset($param['u'])) {
-				if (!strpos($param['u'], "/")) {
-					$html = $this->getSimpleHTMLDOM('https://www.facebook.com/'.urlencode($param['u']).'?_fb_noscript=1') or $this->returnServerError('No results for this query.');
+			if (isset($param['u']['value'])) {
+				if (!strpos($param['u']['value'], "/")) {
+					$html = $this->getSimpleHTMLDOM('https://www.facebook.com/'.urlencode($param['u']['value']).'?_fb_noscript=1') or $this->returnServerError('No results for this query.');
 				} else {
-					$html = $this->getSimpleHTMLDOM('https://www.facebook.com/pages/'.$param['u'].'?_fb_noscript=1') or $this->returnServerError('No results for this query.');
+					$html = $this->getSimpleHTMLDOM('https://www.facebook.com/pages/'.$param['u']['value'].'?_fb_noscript=1') or $this->returnServerError('No results for this query.');
 				}
 			} else {
 				$this->returnClientError('You must specify a Facebook username.');
@@ -148,7 +149,7 @@ class FacebookBridge extends BridgeAbstract{
 		if(isset($element)) {
 
 			$author = str_replace(' | Facebook', '', $html->find('title#pageTitle', 0)->innertext);
-			$profilePic = 'https://graph.facebook.com/'.$param['u'].'/picture?width=200&amp;height=200';
+			$profilePic = 'https://graph.facebook.com/'.$param['u']['value'].'/picture?width=200&amp;height=200';
 			$this->name = $author;
 
 			foreach($element->children() as $post) {
@@ -207,8 +208,8 @@ class FacebookBridge extends BridgeAbstract{
 	}
 
 	public function setDatas(array $param){
-		if (isset($param['captcha_response']))
-			unset($param['captcha_response']);
+		if (isset($param['captcha_response']['value']))
+			unset($param['captcha_response']['value']);
 		parent::setDatas($param);
 	}
 

+ 1 - 1
bridges/FierPandaBridge.php

@@ -10,7 +10,7 @@ Class FierPandaBridge extends BridgeAbstract{
 
     }
 
-    public function collectData(array $param){
+    public function collectData(){
         $link = 'http://www.fier-panda.fr/';
 
         $html = $this->getSimpleHTMLDOM($link) or $this->returnServerError('Could not request Fier Panda.');

+ 1 - 1
bridges/FlickrExploreBridge.php

@@ -10,7 +10,7 @@ class FlickrExploreBridge extends BridgeAbstract{
 
 	}
 
-    public function collectData(array $param){
+    public function collectData(){
         $html = $this->getSimpleHTMLDOM('https://www.flickr.com/explore') or $this->returnServerError('Could not request Flickr.');
 
         foreach($html->find('.photo-list-photo-view') as $element) {

+ 6 - 5
bridges/FlickrTagBridge.php

@@ -17,14 +17,15 @@ class FlickrTagBridge extends BridgeAbstract{
         );
 	}
 
-    public function collectData(array $param){
+    public function collectData(){
+        $param=$this->parameters[$this->queriedContext];
         $html = $this->getSimpleHTMLDOM('http://www.flickr.com/search/?q=vendee&s=rec') or $this->returnServerError('Could not request Flickr.');
-        if (isset($param['q'])) {   /* keyword search mode */
-            $this->request = $param['q'];
+        if (isset($param['q']['value'])) {   /* keyword search mode */
+            $this->request = $param['q']['value'];
             $html = $this->getSimpleHTMLDOM('http://www.flickr.com/search/?q='.urlencode($this->request).'&s=rec') or $this->returnServerError('No results for this query.');
         }
-        elseif (isset($param['u'])) {   /* user timeline mode */
-            $this->request = $param['u'];
+        elseif (isset($param['u']['value'])) {   /* user timeline mode */
+            $this->request = $param['u']['value'];
             $html = $this->getSimpleHTMLDOM('http://www.flickr.com/photos/'.urlencode($this->request).'/') or $this->returnServerError('Requested username can\'t be found.');
         }
 

+ 1 - 1
bridges/FootitoBridge.php

@@ -10,7 +10,7 @@ class FootitoBridge extends BridgeAbstract{
 
 	}
 
-    public function collectData(array $param){
+    public function collectData(){
         $html = $this->getSimpleHTMLDOM('http://www.footito.fr/') or $this->returnServerError('Could not request Footito.');
 
         foreach($html->find('div.post') as $element) {

+ 4 - 3
bridges/FourchanBridge.php

@@ -14,12 +14,13 @@ class FourchanBridge extends BridgeAbstract{
 	}
 
 
-  public function collectData(array $param){
+  public function collectData(){
+        $param=$this->parameters[$this->queriedContext];
 
-	if (!isset($param['t']))
+	if (!isset($param['t']['value']))
 		$this->returnClientError('You must specify the thread URL (?t=...)');
 
-	$thread = parse_url($param['t']) or $this->returnClientError('This URL seems malformed, please check it.');
+	$thread = parse_url($param['t']['value']) or $this->returnClientError('This URL seems malformed, please check it.');
 	if($thread['host'] !== 'boards.4chan.org')
 		$this->returnClientError('4chan thread URL only.');
 

+ 2 - 1
bridges/FreenewsBridge.php

@@ -14,7 +14,8 @@ class FreenewsBridge extends RssExpander {
         );
 	}
 
-    public function collectData(array $param){
+    public function collectData(){
+        $param=$this->parameters[$this->queriedContext];
         parent::collectExpandableDatas($param, FREENEWS_RSS);
     }
 

+ 5 - 4
bridges/FuturaSciencesBridge.php

@@ -81,7 +81,8 @@ class FuturaSciencesBridge extends BridgeAbstract {
         );
     }
 
-    public function collectData(array $param) {
+    public function collectData(){
+        $param=$this->parameters[$this->queriedContext];
 
         function StripCDATA($string) {
             $string = str_replace('<![CDATA[', '', $string);
@@ -138,10 +139,10 @@ class FuturaSciencesBridge extends BridgeAbstract {
             return '';
         }
 
-        $url = $this->getURI().'rss/'.$param['feed'].'.xml';
-        if (empty($param['feed']))
+        $url = $this->getURI().'rss/'.$param['feed']['value'].'.xml';
+        if (empty($param['feed']['value']))
             $this->returnClientError('Please select a feed to display.'.$url);
-        if ($param['feed'] !== preg_replace('/[^a-zA-Z-\/]+/', '', $param['feed']) || substr_count($param['feed'], '/') > 1 || strlen($param['feed'] > 64))
+        if ($param['feed']['value'] !== preg_replace('/[^a-zA-Z-\/]+/', '', $param['feed']['value']) || substr_count($param['feed']['value'], '/') > 1 || strlen($param['feed']['value'] > 64))
             $this->returnClientError('Invalid "feed" parameter.'.$url);
 
         $html = $this->getSimpleHTMLDOM($url) or $this->returnServerError('Could not request Futura-Sciences: '.$url);

+ 5 - 4
bridges/GBAtempBridge.php

@@ -63,11 +63,12 @@ class GBAtempBridge extends BridgeAbstract {
         return $this->cleanup_post_content($content, $site_url);
     }
 
-    public function collectData(array $param) {
+    public function collectData(){
+        $param=$this->parameters[$this->queriedContext];
         $typeFilter = '';
-        if (!empty($param['type'])) {
-            if ($param['type'] == 'N' || $param['type'] == 'R' || $param['type'] == 'T' || $param['type'] == 'F') {
-                $typeFilter = $param['type'];
+        if (!empty($param['type']['value'])) {
+            if ($param['type']['value'] == 'N' || $param['type']['value'] == 'R' || $param['type']['value'] == 'T' || $param['type']['value'] == 'F') {
+                $typeFilter = $param['type']['value'];
                 if ($typeFilter == 'N') { $this->filter = 'News'; }
                 if ($typeFilter == 'R') { $this->filter = 'Review'; }
                 if ($typeFilter == 'T') { $this->filter = 'Tutorial'; }

+ 5 - 4
bridges/GawkerBridge.php

@@ -21,12 +21,13 @@ class GawkerBridge extends RssExpander{
         return RSS_PREFIX.$name.RSS_SUFFIX;
     }
 
-    public function collectData(array $param){
-        if (empty($param['site'])) {
+    public function collectData(){
+        $param=$this->parameters[$this->queriedContext];
+        if (empty($param['site']['value'])) {
 			trigger_error("If no site is provided, nothing is gonna happen", E_USER_ERROR);
         } else {
-            $this->name = $param['site'];
-			$url = $this->toURI(strtolower($param['site']));
+            $this->name = $param['site']['value'];
+			$url = $this->toURI(strtolower($param['site']['value']));
         }
         $this->debugMessage("loading feed from ".$this->getURI());
         parent::collectExpandableDatas($param, $url);

+ 6 - 5
bridges/GelbooruBridge.php

@@ -18,15 +18,16 @@ class GelbooruBridge extends BridgeAbstract{
 
 	}
 
-    public function collectData(array $param){
+    public function collectData(){
+        $param=$this->parameters[$this->queriedContext];
 	$page = 0;
-        if (isset($param['p'])) {
-		$page = (int)preg_replace("/[^0-9]/",'', $param['p']);
+        if (isset($param['p']['value'])) {
+		$page = (int)preg_replace("/[^0-9]/",'', $param['p']['value']);
 		$page = $page - 1;
 		$page = $page * 63;
         }
-        if (isset($param['t'])) {
-            $tags = urlencode($param['t']);
+        if (isset($param['t']['value'])) {
+            $tags = urlencode($param['t']['value']);
         }
         $html = $this->getSimpleHTMLDOM("http://gelbooru.com/index.php?page=post&s=list&tags=$tags&pid=$page") or $this->returnServerError('Could not request Gelbooru.');
 

+ 7 - 6
bridges/GiphyBridge.php

@@ -20,23 +20,24 @@ class GiphyBridge extends BridgeAbstract{
 
 	}
 
-	public function collectData(array $param){
+	public function collectData(){
+        $param=$this->parameters[$this->queriedContext];
 		$html = '';
         $base_url = 'http://giphy.com';
-		if (isset($param['s'])) {   /* keyword search mode */
-			$html = $this->getSimpleHTMLDOM($base_url.'/search/'.urlencode($param['s'].'/')) or $this->returnServerError('No results for this query.');
+		if (isset($param['s']['value'])) {   /* keyword search mode */
+			$html = $this->getSimpleHTMLDOM($base_url.'/search/'.urlencode($param['s']['value'].'/')) or $this->returnServerError('No results for this query.');
 		}
 		else {
 			$this->returnClientError('You must specify a search worf (?s=...).');
 		}
 
         $max = GIPHY_LIMIT;
-        if (isset($param['n'])) {
-            $max = (integer) $param['n'];
+        if (isset($param['n']['value'])) {
+            $max = (integer) $param['n']['value'];
         }
 
         $limit = 0;
-        $kw = urlencode($param['s']);
+        $kw = urlencode($param['s']['value']);
         foreach($html->find('div.hoverable-gif') as $entry) {
             if($limit < $max) {
                 $node = $entry->first_child();

+ 5 - 4
bridges/GithubIssueBridge.php

@@ -28,12 +28,13 @@ class GithubIssueBridge extends BridgeAbstract{
     );
   }
 
-  public function collectData(array $param){
-    $uri = 'https://github.com/'.$param['u'].'/'.$param['p'].'/issues/'.(isset($param['i'])?$param['i']:'');
+  public function collectData(){
+        $param=$this->parameters[$this->queriedContext];
+    $uri = 'https://github.com/'.$param['u']['value'].'/'.$param['p']['value'].'/issues/'.(isset($param['i']['value'])?$param['i']['value']:'');
     $html = $this->getSimpleHTMLDOM($uri)
-      or $this->returnServerError('No results for Github Issue '.$param['i'].' in project '.$param['u'].'/'.$param['p']);
+      or $this->returnServerError('No results for Github Issue '.$param['i']['value'].' in project '.$param['u']['value'].'/'.$param['p']['value']);
 
-    if(isset($param['i'])){
+    if(isset($param['i']['value'])){
       foreach($html->find('.js-comment-container') as $comment){
 
         $item = array();

+ 8 - 7
bridges/GitlabCommitsBridge.php

@@ -33,29 +33,30 @@ class GitlabCommitsBridge extends BridgeAbstract{
     );
   }
 
-  public function collectData(array $param){
-    $uri = $param['uri'].'/'.$param['u'].'/'.$param['p'].'/commits/';
-    if(isset($param['b'])){
-      $uri.=$param['b'];
+  public function collectData(){
+        $param=$this->parameters[$this->queriedContext];
+    $uri = $param['uri']['value'].'/'.$param['u']['value'].'/'.$param['p']['value'].'/commits/';
+    if(isset($param['b']['value'])){
+      $uri.=$param['b']['value'];
     }else{
       $uri.='master';
     }
 
     $html = $this->getSimpleHTMLDOM($uri)
-      or $this->returnServerError('No results for Gitlab Commits of project '.$param['uri'].'/'.$param['u'].'/'.$param['p']);
+      or $this->returnServerError('No results for Gitlab Commits of project '.$param['uri']['value'].'/'.$param['u']['value'].'/'.$param['p']['value']);
 
 
     foreach($html->find('li.commit') as $commit){
 
       $item = array();
-      $item['uri']=$param['uri'];
+      $item['uri']=$param['uri']['value'];
 
       foreach($commit->getElementsByTagName('a') as $a){
         $classes=explode(' ',$a->getAttribute("class"));
         if(in_array('commit-short-id',$classes) ||
           in_array('commit_short_id',$classes)){
           $href=$a->getAttribute('href');
-          $item['uri'].=substr($href,strpos($href,'/'.$param['u'].'/'.$param['p']));
+          $item['uri'].=substr($href,strpos($href,'/'.$param['u']['value'].'/'.$param['p']['value']));
         }
         if(in_array('commit-row-message',$classes)){
           $item['title']=$a->plaintext;

+ 1 - 1
bridges/GizmodoFRBridge.php

@@ -10,7 +10,7 @@ class GizmodoFRBridge extends BridgeAbstract{
 
 	}
 
-    public function collectData(array $param){
+    public function collectData(){
 
         function GizmodoFRExtractContent($url) {
             $articleHTMLContent = $this->getSimpleHTMLDOM($url);

+ 3 - 3
bridges/GooglePlusPostBridge.php

@@ -22,14 +22,14 @@ class GooglePlusPostBridge extends BridgeAbstract
 
 	const GOOGLE_PLUS_BASE_URL = 'https://plus.google.com/';
 
-	public function collectData(array $param)
+	public function collectData()
 	{
-		if (!isset($param['username']))
+		if (!isset($param['username']['value']))
 		{
 			$this->returnClientError('You must specify a username (?username=...).');
 		}
 
-		$this->request = $param['username'];
+		$this->request = $param['username']['value'];
 		// get content parsed
 //		$html = $this->getSimpleHTMLDOM(__DIR__ . '/../posts2.html'
 		$html = $this->getSimpleHTMLDOM(self::GOOGLE_PLUS_BASE_URL . urlencode($this->request) . '/posts'

+ 4 - 3
bridges/GoogleSearchBridge.php

@@ -25,11 +25,12 @@ class GoogleSearchBridge extends BridgeAbstract{
 	}
 
 
-    public function collectData(array $param){
+    public function collectData(){
+        $param=$this->parameters[$this->queriedContext];
         $html = '';
 
-        if (isset($param['q'])) {   /* keyword search mode */
-            $this->request = $param['q'];
+        if (isset($param['q']['value'])) {   /* keyword search mode */
+            $this->request = $param['q']['value'];
             $html = $this->getSimpleHTMLDOM('https://www.google.com/search?q=' . urlencode($this->request) . '&num=100&complete=0&tbs=qdr:y,sbd:1') or $this->returnServerError('No results for this query.');
         }
         else{

+ 1 - 1
bridges/GuruMedBridge.php

@@ -14,7 +14,7 @@ class GuruMedBridge extends BridgeAbstract{
 		return $string;
 	}
 
-	public function collectData(array $param){
+	public function collectData(){
 		$html = $this->getSimpleHTMLDOM('http://gurumed.org/feed') or $this->returnServerError('Could not request Gurumed.');
 		$limit = 0;
 

+ 5 - 4
bridges/HDWallpapersBridge.php

@@ -21,12 +21,13 @@ class HDWallpapersBridge extends BridgeAbstract {
         );
 	}
 
-    public function collectData(array $param){
+    public function collectData(){
+        $param=$this->parameters[$this->queriedContext];
         $html = '';
         $baseUri = 'http://www.hdwallpapers.in';
 
-        $this->category   = $param['c'] ?: 'latest_wallpapers'; // Latest default
-        $this->resolution = $param['r'] ?: '1920x1200';         // Wide wallpaper default
+        $this->category   = $param['c']['value'] ?: 'latest_wallpapers'; // Latest default
+        $this->resolution = $param['r']['value'] ?: '1920x1200';         // Wide wallpaper default
 
         $category = $this->category;
         if (strrpos($category, 'wallpapers') !== strlen($category)-strlen('wallpapers')) {
@@ -34,7 +35,7 @@ class HDWallpapersBridge extends BridgeAbstract {
         }
 
         $num = 0;
-        $max = $param['m'] ?: 14;
+        $max = $param['m']['value'] ?: 14;
         $lastpage = 1;
 
         for ($page = 1; $page <= $lastpage; $page++) {

+ 1 - 1
bridges/HentaiHavenBridge.php

@@ -10,7 +10,7 @@ class HentaiHavenBridge extends BridgeAbstract{
 
 	}
 
-    public function collectData(array $param){
+    public function collectData(){
         $html = $this->getSimpleHTMLDOM('http://hentaihaven.org/') or $this->returnServerError('Could not request Hentai Haven.');
         foreach($html->find('div.zoe-grid') as $element) {
             $item = array();

+ 5 - 4
bridges/IdenticaBridge.php

@@ -19,10 +19,11 @@ class IdenticaBridge extends BridgeAbstract{
 
 	}
 
-    public function collectData(array $param){
+    public function collectData(){
+        $param=$this->parameters[$this->queriedContext];
         $html = '';
-        if (isset($param['u'])) {   /* user timeline mode */
-        	$this->request = $param['u'];
+        if (isset($param['u']['value'])) {   /* user timeline mode */
+        	$this->request = $param['u']['value'];
             $html = $this->getSimpleHTMLDOM('https://identi.ca/'.urlencode($this->request)) or $this->returnServerError('Requested username can\'t be found.');
         }
         else {
@@ -34,7 +35,7 @@ class IdenticaBridge extends BridgeAbstract{
             $item['uri'] = html_entity_decode($dent->find('a', 0)->href);	// get dent link
             $item['timestamp'] = strtotime($dent->find('abbr.easydate', 0)->plaintext);	// extract dent timestamp
             $item['content'] = trim($dent->find('div.activity-content', 0)->innertext);	// extract dent text
-            $item['title'] = $param['u'] . ' | ' . $item['content'];
+            $item['title'] = $param['u']['value'] . ' | ' . $item['content'];
             $this->items[] = $item;
         }
     }

+ 4 - 3
bridges/InstagramBridge.php

@@ -16,10 +16,11 @@ class InstagramBridge extends BridgeAbstract{
 
 	}
 
-    public function collectData(array $param){
+    public function collectData(){
+        $param=$this->parameters[$this->queriedContext];
         $html = '';
-        if (isset($param['u'])) {   /* user timeline mode */
-            $this->request = $param['u'];
+        if (isset($param['u']['value'])) {   /* user timeline mode */
+            $this->request = $param['u']['value'];
             $html = $this->getSimpleHTMLDOM('http://instagram.com/'.urlencode($this->request)) or $this->returnServerError('Could not request Instagram.');
         }
         else {

+ 12 - 11
bridges/IsoHuntBridge.php

@@ -89,23 +89,24 @@ class IsoHuntBridge extends BridgeAbstract{
         );
     }
 
-    public function collectData(array $params){
+    public function collectData(){
+        $params=$this->parameters[$this->queriedContext];
         $request_path = '/'; // We'll request the main page by default
 
-        if(isset($params['latest_category'])){ // Requesting one of the latest categories
-            $this->request_latest_category($params['latest_category']);
-        } elseif(isset($params['torrent_category'])){ // Requesting one of the torrent categories
+        if(isset($params['latest_category']['value'])){ // Requesting one of the latest categories
+            $this->request_latest_category($params['latest_category']['value']);
+        } elseif(isset($params['torrent_category']['value'])){ // Requesting one of the torrent categories
             $order_popularity = false;
 
-            if(isset($params['torrent_popularity']))
-                $order_popularity = $params['torrent_popularity'] === "on";
+            if(isset($params['torrent_popularity']['value']))
+                $order_popularity = $params['torrent_popularity']['value'];
 
-            $this->request_torrent_category($params['torrent_category'], $order_popularity);
-        } else if(isset($params['search_name'])){ // Requesting search
-            if(isset($params['search_category']))
-                $this->request_search($params['search_name'], $params['search_category']);
+            $this->request_torrent_category($params['torrent_category']['value'], $order_popularity);
+        } else if(isset($params['search_name']['value'])){ // Requesting search
+            if(isset($params['search_category']['value']))
+                $this->request_search($params['search_name']['value'], $params['search_category']['value']);
             else
-                $this->request_search($params['search_name']);
+                $this->request_search($params['search_name']['value']);
         } else {
             $this->returnClientError('Unknown request!');
         }

+ 3 - 2
bridges/JapanExpoBridge.php

@@ -18,7 +18,8 @@ class JapanExpoBridge extends BridgeAbstract{
         );
     }
 
-    public function collectData(array $param) {
+    public function collectData(){
+        $param=$this->parameters[$this->queriedContext];
 
         function french_pubdate_to_timestamp($date_to_parse) {
             return strtotime(
@@ -50,7 +51,7 @@ class JapanExpoBridge extends BridgeAbstract{
 
         $link = 'http://www.japan-expo-paris.com/fr/actualites';
         $html = $this->getSimpleHTMLDOM($link) or $this->returnServerError('Could not request JapanExpo: '.$link);
-        $fullcontent = (!empty($param['mode']) && $param['mode'] == 'full');
+        $fullcontent = (!empty($param['mode']['value']) && $param['mode']['value'] == 'full');
         $count = 0;
 
         foreach ($html->find('a._tile2') as $element) {

+ 6 - 5
bridges/KonachanBridge.php

@@ -17,13 +17,14 @@ class KonachanBridge extends BridgeAbstract{
         );
 	}
 
-    public function collectData(array $param){
+    public function collectData(){
+        $param=$this->parameters[$this->queriedContext];
 	$page = 1;$tags='';
-        if (isset($param['p'])) {
-            $page = (int)preg_replace("/[^0-9]/",'', $param['p']);
+        if (isset($param['p']['value'])) {
+            $page = (int)preg_replace("/[^0-9]/",'', $param['p']['value']);
         }
-        if (isset($param['t'])) {
-            $tags = urlencode($param['t']);
+        if (isset($param['t']['value'])) {
+            $tags = urlencode($param['t']['value']);
         }
         $html = $this->getSimpleHTMLDOM("http://konachan.com/post?page=$page&tags=$tags") or $this->returnServerError('Could not request Konachan.');
 	$input_json = explode('Post.register(', $html);

+ 1 - 1
bridges/KoreusBridge.php

@@ -21,7 +21,7 @@ class KoreusBridge extends BridgeAbstract{
 		return $text;
 	}
 
-	public function collectData(array $param){
+	public function collectData(){
 		$html = $this->getSimpleHTMLDOM('http://feeds.feedburner.com/Koreus-articles') or $this->returnServerError('Could not request Koreus.');
 		$limit = 0;
 

+ 6 - 5
bridges/KununuBridge.php

@@ -39,21 +39,22 @@ class KununuBridge extends BridgeAbstract{
         );
 	}
 
-	public function collectData(array $params){
+	public function collectData(){
+        $params=$this->parameters[$this->queriedContext];
 
 		// Get Site
-		$site = strtolower(trim($params['site']));
+		$site = strtolower(trim($params['site']['value']));
 		if(!isset($site) || empty($site) || !$this->site_is_valid($site))
 			$this->returnClientError('You must specify a valid site (&site=...)!');
 
 		// Get Company (fixing whitespace and umlauts)
-		$company = $this->encode_umlauts(strtolower(str_replace(' ', '-', trim($params['company']))));
+		$company = $this->encode_umlauts(strtolower(str_replace(' ', '-', trim($params['company']['value']))));
 		if(!isset($company) || empty($company))
 			$this->returnClientError('You must specify a company (&company=...)!');
 
 		$full = false; // By default we'll load only short article
-		if(isset($params['full']))
-			$full = strtolower(trim($params['full'])) === 'on';
+		if(isset($params['full']['value']))
+			$full = strtolower(trim($params['full']['value'])) === 'on';
 
 		// Get reviews section name (depends on site)
 		$section = '';

+ 1 - 1
bridges/LWNprevBridge.php

@@ -35,7 +35,7 @@ class LWNprevBridge extends BridgeAbstract{
     }
   }
 
-  public function collectData(array $param){
+  public function collectData(){
     // Because the LWN page is written in loose HTML and not XHTML,
     // Simple HTML Dom is not accurate enough for the job
 

+ 5 - 4
bridges/LeBonCoinBridge.php

@@ -138,14 +138,15 @@ class LeBonCoinBridge extends BridgeAbstract{
 	}
 
 
-	public function collectData(array $param){
+	public function collectData(){
+        $param=$this->parameters[$this->queriedContext];
 
 		$html = '';
-		if (empty($param['c'])) {
-			$link = 'http://www.leboncoin.fr/annonces/offres/' . $param['r'] . '/?f=a&th=1&q=' . urlencode($param['k']);
+		if (empty($param['c']['value'])) {
+			$link = 'http://www.leboncoin.fr/annonces/offres/' . $param['r']['value'] . '/?f=a&th=1&q=' . urlencode($param['k']['value']);
 		}
 		else {
-			$link = 'http://www.leboncoin.fr/' . $param['c'] . '/offres/' . $param['r'] . '/?f=a&th=1&q=' . urlencode($param['k']);
+			$link = 'http://www.leboncoin.fr/' . $param['c']['value'] . '/offres/' . $param['r']['value'] . '/?f=a&th=1&q=' . urlencode($param['k']['value']);
 		}
 		$html = $this->getSimpleHTMLDOM($link) or $this->returnServerError('Could not request LeBonCoin.');
 

+ 1 - 1
bridges/LeJournalDuGeekBridge.php

@@ -36,7 +36,7 @@ class LeJournalDuGeekBridge extends BridgeAbstract{
 		return $text;
 	}
 
-	public function collectData(array $param){
+	public function collectData(){
 		$rssFeed = $this->getSimpleHTMLDOM('http://www.journaldugeek.com/rss') or $this->returnServerError('Could not request http://www.journaldugeek.com/rss');
 		$limit = 0;
 

+ 1 - 1
bridges/LeMondeInformatiqueBridge.php

@@ -10,7 +10,7 @@ class LeMondeInformatiqueBridge extends BridgeAbstract {
 
     }
 
-    public function collectData(array $param) {
+    public function collectData(){
 
         function StripCDATA($string) {
             $string = str_replace('<![CDATA[', '', $string);

+ 2 - 1
bridges/Les400CulsBridge.php

@@ -14,7 +14,8 @@ class Les400CulsBridge extends RssExpander{
 	}
 
 
-    public function collectData(array $param){
+    public function collectData(){
+        $param=$this->parameters[$this->queriedContext];
         parent::collectExpandableDatas($param, SEXE_FEED);
     }
     

+ 1 - 1
bridges/LesJoiesDuCodeBridge.php

@@ -10,7 +10,7 @@ class LesJoiesDuCodeBridge extends BridgeAbstract{
 
 	}
 
-    public function collectData(array $param){
+    public function collectData(){
         $html = $this->getSimpleHTMLDOM('http://lesjoiesducode.fr/') or $this->returnServerError('Could not request LesJoiesDuCode.');
 
         foreach($html->find('div.blog-post') as $element) {

+ 1 - 1
bridges/LichessBridge.php

@@ -10,7 +10,7 @@ class LichessBridge  extends BridgeAbstract
         $this->description = 'Returns the 5 newest posts from the Lichess blog (full text)';
     }
 
-    public function collectData(array $param)
+    public function collectData()
     {
         $xml_feed = $this->getSimpleHTMLDOM('http://fr.lichess.org/blog.atom') or $this->returnServerError('Could not retrieve Lichess blog feed.');
 

+ 3 - 2
bridges/LinkedInCompany.php

@@ -16,9 +16,10 @@ class LinkedInCompany extends BridgeAbstract{
         );
 	}
 
-    public function collectData(array $param){
+    public function collectData(){
+        $param=$this->parameters[$this->queriedContext];
         $html = '';
-        $link = 'https://www.linkedin.com/company/'.$param['c'];
+        $link = 'https://www.linkedin.com/company/'.$param['c']['value'];
 
         $html = $this->getSimpleHTMLDOM($link) or $this->returnServerError('Could not request LinkedIn.');
 

+ 6 - 5
bridges/LolibooruBridge.php

@@ -17,13 +17,14 @@ class LolibooruBridge extends BridgeAbstract{
         );
 	}
 
-    public function collectData(array $param){
+    public function collectData(){
+        $param=$this->parameters[$this->queriedContext];
 	$page = 1; $tags = '';
-        if (isset($param['p'])) {
-            $page = (int)preg_replace("/[^0-9]/",'', $param['p']);
+        if (isset($param['p']['value'])) {
+            $page = (int)preg_replace("/[^0-9]/",'', $param['p']['value']);
         }
-        if (isset($param['t'])) {
-            $tags = urlencode($param['t']);
+        if (isset($param['t']['value'])) {
+            $tags = urlencode($param['t']['value']);
         }
         $html = $this->getSimpleHTMLDOM("http://lolibooru.moe/post?page=$page&tags=$tags") or $this->returnServerError('Could not request Lolibooru.');
 	$input_json = explode('Post.register(', $html);

+ 9 - 8
bridges/MangareaderBridge.php

@@ -76,7 +76,8 @@ class MangareaderBridge extends BridgeAbstract{
         );
 	}
 
-	public function collectData(array $param){
+	public function collectData(){
+        $param=$this->parameters[$this->queriedContext];
 
         $this->request = '';
 
@@ -84,21 +85,21 @@ class MangareaderBridge extends BridgeAbstract{
         $path = "latest";
         $limit = MANGAREADER_LIMIT;
 
-        if(isset($param['category'])){ // Get popular updates
+        if(isset($param['category']['value'])){ // Get popular updates
             $type = "popular";
             $path = "popular";
-            if($param['category'] !== "all"){
-                $path .= "/" . $param['category'];
+            if($param['category']['value'] !== "all"){
+                $path .= "/" . $param['category']['value'];
             }
         }
 
-        if(isset($param['path'])){ // Get manga updates
+        if(isset($param['path']['value'])){ // Get manga updates
             $type = "path";
-            $path = $param['path'];
+            $path = $param['path']['value'];
         }
 
-        if(isset($param['limit']) && $param['limit'] !== ""){ // Get manga updates (optional parameter)
-            $limit = $param['limit'];
+        if(isset($param['limit']['value']) && $param['limit']['value'] !== ""){ // Get manga updates (optional parameter)
+            $limit = $param['limit']['value'];
         }
 
 		// We'll use the DOM parser for this as it makes navigation easier

+ 6 - 5
bridges/MilbooruBridge.php

@@ -17,13 +17,14 @@ class MilbooruBridge extends BridgeAbstract{
         );
 	}
 
-    public function collectData(array $param){
+    public function collectData(){
+        $param=$this->parameters[$this->queriedContext];
 	$page = 0;$tags='';
-        if (isset($param['p'])) {
-            $page = (int)preg_replace("/[^0-9]/",'', $param['p']);
+        if (isset($param['p']['value'])) {
+            $page = (int)preg_replace("/[^0-9]/",'', $param['p']['value']);
         }
-        if (isset($param['t'])) {
-            $tags = urlencode($param['t']);
+        if (isset($param['t']['value'])) {
+            $tags = urlencode($param['t']['value']);
         }
         $html = $this->getSimpleHTMLDOM("http://sheslostcontrol.net/moe/shimmie/index.php?q=/post/list/$tags/$page") or $this->returnServerError('Could not request Milbooru.');
 

+ 1 - 1
bridges/MondeDiploBridge.php

@@ -8,7 +8,7 @@ class MondeDiploBridge extends BridgeAbstract{
 		$this->description = "Returns most recent results from MondeDiplo.";
 	}
 
-	public function collectData(array $param){
+	public function collectData(){
 		$html = $this->getSimpleHTMLDOM($this->uri) or $this->returnServerError('Could not request MondeDiplo. for : ' . $link);
 
 		foreach($html->find('div.unarticle') as $article) {

+ 1 - 1
bridges/MsnMondeBridge.php

@@ -14,7 +14,7 @@ class MsnMondeBridge extends BridgeAbstract{
 		$item['timestamp'] = strtotime($html2->find('.authorinfo-txt', 0)->find('time', 0)->datetime);
 	}
 
-	public function collectData(array $param){
+	public function collectData(){
 		$html = $this->getSimpleHTMLDOM($this->uri) or $this->returnServerError('Could not request MsnMonde.');
 		$limit = 0;
 		foreach($html->find('.smalla') as $article) {

+ 6 - 5
bridges/MspabooruBridge.php

@@ -18,15 +18,16 @@ class MspabooruBridge extends BridgeAbstract{
 
 	}
 
-    public function collectData(array $param){
+    public function collectData(){
+        $param=$this->parameters[$this->queriedContext];
 	$page = 0;$tags='';
-        if (isset($param['p'])) {
-		$page = (int)preg_replace("/[^0-9]/",'', $param['p']);
+        if (isset($param['p']['value'])) {
+		$page = (int)preg_replace("/[^0-9]/",'', $param['p']['value']);
 		$page = $page - 1;
 		$page = $page * 50;
         }
-        if (isset($param['t'])) {
-            $tags = urlencode($param['t']);
+        if (isset($param['t']['value'])) {
+            $tags = urlencode($param['t']['value']);
         }
         $html = $this->getSimpleHTMLDOM("http://mspabooru.com/index.php?page=post&s=list&tags=$tags&pid=$page") or $this->returnServerError('Could not request Mspabooru.');
 

+ 1 - 1
bridges/NakedSecurityBridge.php

@@ -8,7 +8,7 @@ class NakedSecurityBridge extends BridgeAbstract {
         $this->description = 'Returns the newest articles.';
     }
 
-    public function collectData(array $param) {
+    public function collectData(){
 
         function StripRecursiveHTMLSection($string, $tag_name, $tag_start) {
             $open_tag = '<'.$tag_name;

+ 1 - 1
bridges/NasaApodBridge.php

@@ -10,7 +10,7 @@ class NasaApodBridge extends BridgeAbstract{
 
 	}
 
-  public function collectData(array $param) {
+  public function collectData(){
 
     $html = $this->getSimpleHTMLDOM('http://apod.nasa.gov/apod/archivepix.html') or $this->returnServerError('Error while downloading the website content');
     $list = explode("<br>", $html->find('b', 0)->innertext);

+ 1 - 1
bridges/NeuviemeArtBridge.php

@@ -8,7 +8,7 @@ class NeuviemeArtBridge extends BridgeAbstract {
         $this->description = "Returns the newest articles.";
     }
 
-    public function collectData(array $param) {
+    public function collectData(){
 
         function StripWithDelimiters($string, $start, $end) {
             while (strpos($string, $start) !== false) {

+ 1 - 1
bridges/NextInpactBridge.php

@@ -25,7 +25,7 @@ class NextInpactBridge extends BridgeAbstract {
 		return $text;
 	}
 
-	public function collectData(array $param) {
+	public function collectData(){
 		$html = $this->getSimpleHTMLDOM('http://www.nextinpact.com/rss/news.xml') or $this->returnServerError('Could not request NextInpact.');
 		$limit = 0;
 

+ 3 - 2
bridges/NextgovBridge.php

@@ -28,7 +28,8 @@ class NextgovBridge extends BridgeAbstract {
         );
     }
 
-    public function collectData(array $param) {
+    public function collectData(){
+        $param=$this->parameters[$this->queriedContext];
 
         function ExtractFromDelimiters($string, $start, $end) {
             if (strpos($string, $start) !== false) {
@@ -46,7 +47,7 @@ class NextgovBridge extends BridgeAbstract {
             } return $string;
         }
 
-        $category = $param['category'];
+        $category = $param['category']['value'];
         if (empty($category))
             $category = 'all';
         if ($category !== preg_replace('/[^a-z-]+/', '', $category) || strlen($category > 32))

+ 1 - 1
bridges/NiceMatinBridge.php

@@ -22,7 +22,7 @@ class NiceMatinBridge extends BridgeAbstract{
 		return $text;
 	}
 
-	public function collectData(array $param){
+	public function collectData(){
 		$html = $this->getSimpleHTMLDOM('http://www.nicematin.com/derniere-minute/rss') or $this->returnServerError('Could not request NiceMatin.');
 		$limit = 0;
 

+ 4 - 3
bridges/NovelUpdatesBridge.php

@@ -15,10 +15,11 @@ class NovelUpdatesBridge extends BridgeAbstract{
         );
 	}
 
-    public function collectData(array $param){
-        if (!isset($param['n']))
+    public function collectData(){
+        $param=$this->parameters[$this->queriedContext];
+        if (!isset($param['n']['value']))
             $this->returnClientError('You must specify the novel URL (/series/...)');
-        $thread = parse_url($param['n']) or $this->returnClientError('This URL seems malformed, please check it.');
+        $thread = parse_url($param['n']['value']) or $this->returnClientError('This URL seems malformed, please check it.');
         if($thread['host'] !== 'www.novelupdates.com')
             $this->returnClientError('NovelUpdates URL only.');
       	if(strpos($thread['path'], 'series/') === FALSE)

+ 1 - 1
bridges/NumeramaBridge.php

@@ -10,7 +10,7 @@ class NumeramaBridge extends BridgeAbstract{
 
     }
 
-    public function collectData(array $param) {
+    public function collectData(){
 
         function NumeramaStripCDATA($string) {
             $string = str_replace('<![CDATA[', '', $string);

+ 4 - 3
bridges/OpenClassroomsBridge.php

@@ -29,14 +29,15 @@ class OpenClassroomsBridge extends BridgeAbstract{
 	}
 
 
-    public function collectData(array $param){
-        if (empty($param['u']))
+    public function collectData(){
+        $param=$this->parameters[$this->queriedContext];
+        if (empty($param['u']['value']))
         {
             $this->returnServerError('Error: You must chose a category.');
         }
 
         $html = '';
-        $link = 'https://openclassrooms.com/courses?categories='.$param['u'].'&title=&sort=updatedAt+desc';
+        $link = 'https://openclassrooms.com/courses?categories='.$param['u']['value'].'&title=&sort=updatedAt+desc';
 
         $html = $this->getSimpleHTMLDOM($link) or $this->returnServerError('Could not request OpenClassrooms.');
 

+ 11 - 11
bridges/ParuVenduImmoBridge.php

@@ -29,7 +29,7 @@ class ParuVenduImmoBridge extends BridgeAbstract
         );
 	}
 
-    public function collectData(array $param)
+    public function collectData()
     {
         $html = '';
         $num = 20;
@@ -37,22 +37,22 @@ class ParuVenduImmoBridge extends BridgeAbstract
         $maison = '&tbMai=1&tbVil=1&tbCha=1&tbPro=1&tbHot=1&tbMou=1&tbFer=1';
         $link = $this->uri.'/immobilier/annonceimmofo/liste/listeAnnonces?tt=1'.$appartment.$maison;
 
-        if (isset($param['minarea'])) {
-            $this->request .= ' '.$param['minarea'].' m2';
-            $link .= '&sur0='.urlencode($param['minarea']);
+        if (isset($param['minarea']['value'])) {
+            $this->request .= ' '.$param['minarea']['value'].' m2';
+            $link .= '&sur0='.urlencode($param['minarea']['value']);
         }
 
-        if (isset($param['maxprice'])) {
-            $link .= '&px1='.urlencode($param['maxprice']);
+        if (isset($param['maxprice']['value'])) {
+            $link .= '&px1='.urlencode($param['maxprice']['value']);
         }
 
-        if (isset($param['pa'])) {
-            $link .= '&pa='.urlencode($param['pa']);
+        if (isset($param['pa']['value'])) {
+            $link .= '&pa='.urlencode($param['pa']['value']);
         }
 
-        if (isset($param['lo'])) {
-            $this->request .= ' In: '.$param['lo'];
-            $link .= '&lo='.urlencode($param['lo']);
+        if (isset($param['lo']['value'])) {
+            $this->request .= ' In: '.$param['lo']['value'];
+            $link .= '&lo='.urlencode($param['lo']['value']);
         }
 
         $html = $this->getSimpleHTMLDOM($link) or $this->returnServerError('Could not request paruvendu.');

+ 7 - 6
bridges/PickyWallpapersBridge.php

@@ -28,19 +28,20 @@ class PickyWallpapersBridge extends BridgeAbstract {
 
 	}
 
-    public function collectData(array $param){
+    public function collectData(){
+        $param=$this->parameters[$this->queriedContext];
         $html = '';
-        if (!isset($param['c'])) {
+        if (!isset($param['c']['value'])) {
             $this->returnClientError('You must specify at least a category (?c=...).');
         } else {
             $baseUri = 'http://www.pickywallpapers.com';
 
-            $this->category = $param['c'];
-            $this->subcategory = $param['s'] ?: '';
-            $this->resolution = $param['r'] ?: '1920x1200';    // Wide wallpaper default
+            $this->category = $param['c']['value'];
+            $this->subcategory = $param['s']['value'] ?: '';
+            $this->resolution = $param['r']['value'] ?: '1920x1200';    // Wide wallpaper default
 
             $num = 0;
-            $max = $param['m'] ?: 12;
+            $max = $param['m']['value'] ?: 12;
             $lastpage = 1;
 
             for ($page = 1; $page <= $lastpage; $page++) {

+ 9 - 8
bridges/PinterestBridge.php

@@ -22,27 +22,28 @@ class PinterestBridge extends BridgeAbstract{
         );
 	}
 
-    public function collectData(array $param){
+    public function collectData(){
+        $param=$this->parameters[$this->queriedContext];
         $html = '';
-        if (isset($param['u']) || isset($param['b'])) {
+        if (isset($param['u']['value']) || isset($param['b']['value'])) {
 
-            if (empty($param['u']))
+            if (empty($param['u']['value']))
             {
                 $this->returnClientError('You must specify a Pinterest username (?u=...).');
             }
 
-            if (empty($param['b']))
+            if (empty($param['b']['value']))
             {
                 $this->returnClientError('You must specify a Pinterest board for this username (?b=...).');
             }
 
-            $this->username = $param['u'];
-            $this->board = $param['b'];
+            $this->username = $param['u']['value'];
+            $this->board = $param['b']['value'];
             $html = $this->getSimpleHTMLDOM($this->getURI().'/'.urlencode($this->username).'/'.urlencode($this->board)) or $this->returnServerError('Username and/or board not found');
 
-        } else if (isset($param['q']))
+        } else if (isset($param['q']['value']))
         {
-        	$this->query = $param['q'];
+        	$this->query = $param['q']['value'];
         	$html = $this->getSimpleHTMLDOM($this->getURI().'/search/?q='.urlencode($this->query)) or $this->returnServerError('Could not request Pinterest.');
         }
 

+ 1 - 1
bridges/PlanetLibreBridge.php

@@ -14,7 +14,7 @@ class PlanetLibreBridge extends BridgeAbstract{
 		return $text;
 	}
 
-	public function collectData(array $param){
+	public function collectData(){
 		$html = $this->getSimpleHTMLDOM('http://www.planet-libre.org/') or $this->returnServerError('Could not request PlanetLibre.');
 		$limit = 0;
 		foreach($html->find('div.post') as $element) {

+ 1 - 1
bridges/ProjectMGameBridge.php

@@ -11,7 +11,7 @@ class ProjectMGameBridge extends BridgeAbstract{
 	}
 
 
-  public function collectData(array $param){
+  public function collectData(){
     $html = '';
     $html = $this->getSimpleHTMLDOM('http://projectmgame.com/en/') or $this->returnServerError('Error while downloading the Project M homepage');
 

+ 4 - 3
bridges/RTBFBridge.php

@@ -15,13 +15,14 @@ class RTBFBridge extends BridgeAbstract {
         );
 	}
 
-	public function collectData(array $param) {
+	public function collectData(){
+        $param=$this->parameters[$this->queriedContext];
 		$html = '';
 		$limit = 10;
 		$count = 0;
 
-		if (isset($param['c'])) {
-			$html = $this->getSimpleHTMLDOM('http://www.rtbf.be/auvio/emissions/detail?id='.$param['c']) or $this->returnServerError('Could not request RTBF.');
+		if (isset($param['c']['value'])) {
+			$html = $this->getSimpleHTMLDOM('http://www.rtbf.be/auvio/emissions/detail?id='.$param['c']['value']) or $this->returnServerError('Could not request RTBF.');
 
 			foreach($html->find('section[id!=widget-ml-avoiraussi-] .rtbf-media-grid article') as $element) {
 				if($count < $limit) {

+ 1 - 1
bridges/Releases3DSBridge.php

@@ -10,7 +10,7 @@ class Releases3DSBridge extends BridgeAbstract {
 
 	}
 
-    public function collectData(array $param) {
+    public function collectData(){
 
         function ExtractFromDelimiters($string, $start, $end) {
             if (strpos($string, $start) !== false) {

+ 1 - 1
bridges/ReporterreBridge.php

@@ -25,7 +25,7 @@ class ReporterreBridge extends BridgeAbstract{
 			return $text;
 		}
 
-	public function collectData(array $param){
+	public function collectData(){
 		$html = $this->getSimpleHTMLDOM('http://www.reporterre.net/spip.php?page=backend') or $this->returnServerError('Could not request Reporterre.');
 		$limit = 0;
 

+ 1 - 1
bridges/Rue89Bridge.php

@@ -19,7 +19,7 @@ class Rue89Bridge extends BridgeAbstract{
 
 	}
 
-    public function collectData(array $param){
+    public function collectData(){
 
         $html = $this->getSimpleHTMLDOM('http://api.rue89.nouvelobs.com/feed') or $this->returnServerError('Could not request Rue89.');
 

+ 6 - 5
bridges/Rule34Bridge.php

@@ -18,15 +18,16 @@ class Rule34Bridge extends BridgeAbstract{
 
 	}
 
-    public function collectData(array $param){
+    public function collectData(){
+        $param=$this->parameters[$this->queriedContext];
 	$page = 0;$tags='';
-        if (isset($param['p'])) {
-		$page = (int)preg_replace("/[^0-9]/",'', $param['p']);
+        if (isset($param['p']['value'])) {
+		$page = (int)preg_replace("/[^0-9]/",'', $param['p']['value']);
 		$page = $page - 1;
 		$page = $page * 50;
         }
-        if (isset($param['t'])) {
-            $tags = urlencode($param['t']);
+        if (isset($param['t']['value'])) {
+            $tags = urlencode($param['t']['value']);
         }
         $html = $this->getSimpleHTMLDOM("http://rule34.xxx/index.php?page=post&s=list&tags=$tags&pid=$page") or $this->returnServerError('Could not request Rule34.');
 

+ 6 - 5
bridges/Rule34pahealBridge.php

@@ -18,13 +18,14 @@ class Rule34pahealBridge extends BridgeAbstract{
 	}
 
 
-    public function collectData(array $param){
+    public function collectData(){
+        $param=$this->parameters[$this->queriedContext];
 	$page = 0;$tags='';
-        if (isset($param['p'])) {
-            $page = (int)preg_replace("/[^0-9]/",'', $param['p']);
+        if (isset($param['p']['value'])) {
+            $page = (int)preg_replace("/[^0-9]/",'', $param['p']['value']);
         }
-        if (isset($param['t'])) {
-            $tags = urlencode($param['t']);
+        if (isset($param['t']['value'])) {
+            $tags = urlencode($param['t']['value']);
         }
         $html = $this->getSimpleHTMLDOM("http://rule34.paheal.net/post/list/$tags/$page") or $this->returnServerError('Could not request Rule34paheal.');
 

+ 6 - 5
bridges/SafebooruBridge.php

@@ -18,15 +18,16 @@ class SafebooruBridge extends BridgeAbstract{
 
 	}
 
-    public function collectData(array $param){
+    public function collectData(){
+        $param=$this->parameters[$this->queriedContext];
 	$page = 0;$tags='';
-        if (isset($param['p'])) {
-		$page = (int)preg_replace("/[^0-9]/",'', $param['p']);
+        if (isset($param['p']['value'])) {
+		$page = (int)preg_replace("/[^0-9]/",'', $param['p']['value']);
 		$page = $page - 1;
 		$page = $page * 40;
         }
-        if (isset($param['t'])) {
-            $tags = urlencode($param['t']);
+        if (isset($param['t']['value'])) {
+            $tags = urlencode($param['t']['value']);
         }
         $html = $this->getSimpleHTMLDOM("http://safebooru.org/index.php?page=post&s=list&tags=$tags&pid=$page") or $this->returnServerError('Could not request Safebooru.');
 

+ 6 - 5
bridges/SakugabooruBridge.php

@@ -18,13 +18,14 @@ class SakugabooruBridge extends BridgeAbstract{
 
 	}
 
-    public function collectData(array $param){
+    public function collectData(){
+        $param=$this->parameters[$this->queriedContext];
 	$page = 1;$tags='';
-        if (isset($param['p'])) {
-            $page = (int)preg_replace("/[^0-9]/",'', $param['p']);
+        if (isset($param['p']['value'])) {
+            $page = (int)preg_replace("/[^0-9]/",'', $param['p']['value']);
         }
-        if (isset($param['t'])) {
-            $tags = urlencode($param['t']);
+        if (isset($param['t']['value'])) {
+            $tags = urlencode($param['t']['value']);
         }
         $html = $this->getSimpleHTMLDOM("http://sakuga.yshi.org/post?page=$page&tags=$tags") or $this->returnServerError('Could not request Sakugabooru.');
 	$input_json = explode('Post.register(', $html);

+ 1 - 1
bridges/ScmbBridge.php

@@ -10,7 +10,7 @@ class ScmbBridge extends BridgeAbstract{
 
 	}
 
-    public function collectData(array $param){
+    public function collectData(){
         $html = '';
         $html = $this->getSimpleHTMLDOM('http://secouchermoinsbete.fr/') or $this->returnServerError('Could not request Se Coucher Moins Bete.');
 

+ 4 - 3
bridges/ScoopItBridge.php

@@ -17,10 +17,11 @@ class ScoopItBridge extends BridgeAbstract{
 
 	}
 
-    public function collectData(array $param){
+    public function collectData(){
+        $param=$this->parameters[$this->queriedContext];
         $html = '';
-        if ($param['u'] != '') {
-            $this->request = $param['u'];
+        if ($param['u']['value'] != '') {
+            $this->request = $param['u']['value'];
             $link = 'http://scoop.it/search?q=' .urlencode($this->request);
 
             $html = $this->getSimpleHTMLDOM($link) or $this->returnServerError('Could not request ScoopIt. for : ' . $link);

+ 8 - 7
bridges/SensCritiqueBridge.php

@@ -37,18 +37,19 @@ class SensCritiqueBridge extends BridgeAbstract {
         );
   }
 
-	public function collectData(array $param) {
-		if ((isset($param['m']) && $param['m'])) {
+	public function collectData(){
+        $param=$this->parameters[$this->queriedContext];
+		if ((isset($param['m']['value']) && $param['m']['value'])) {
 			$this->collectMoviesData();
-		} else if ((isset($param['s']) && $param['s'])) {
+		} else if ((isset($param['s']['value']) && $param['s']['value'])) {
 			$this->collectSeriesData();
-		} else if ((isset($param['g']) && $param['g'])) {
+		} else if ((isset($param['g']['value']) && $param['g']['value'])) {
 			$this->collectGamesData();
-		} else if ((isset($param['b']) && $param['b'])) {
+		} else if ((isset($param['b']['value']) && $param['b']['value'])) {
 			$this->collectBooksData();
-		} else if ((isset($param['bd']) && $param['bd'])) {
+		} else if ((isset($param['bd']['value']) && $param['bd']['value'])) {
 			$this->collectBDsData();
-		} else if ((isset($param['mu']) && $param['mu'])) {
+		} else if ((isset($param['mu']['value']) && $param['mu']['value'])) {
 			$this->collectMusicsData();
 		} else {
 			$this->returnClientError('You must choose a category');

+ 1 - 1
bridges/Sexactu.php

@@ -10,7 +10,7 @@ class Sexactu extends BridgeAbstract{
 
 	}
 
-    public function collectData(array $param){
+    public function collectData(){
 $find = array('janvier', 'février', 'mars', 'avril', 'mai', 'juin', 'juillet', 'août', 'septembre', 'novembre', 'décembre');
 $replace = array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');
 

Some files were not shown because too many files changed in this diff