+
+ return $ret;
+ }
+
+ /**
+ * Merge params beetween the ones passed to the function and the ones given
+ * by self::$siteParamsCallback for backward compatibility
+ * Values returned by self::getWikiParams() have the priority.
+ *
+ * @param $wiki String Wiki ID of the wiki in question.
+ * @param $suffix String The suffix of the wiki in question.
+ * @param $params Array List of parameters. $.'key' is replaced by $value in
+ * all returned data.
+ * @param $wikiTags Array The tags assigned to the wiki.
+ * @return array
+ */
+ protected function mergeParams( $wiki, $suffix, /*array*/ $params, /*array*/ $wikiTags ){
+ $ret = $this->getWikiParams( $wiki );
+
+ if( is_null( $ret['suffix'] ) )
+ $ret['suffix'] = $suffix;
+
+ $ret['tags'] = array_unique( array_merge( $ret['tags'], $wikiTags ) );
+
+ $ret['params'] += $params;
+
+ // Automatically fill that ones if needed
+ if( !isset( $ret['params']['lang'] ) && !is_null( $ret['lang'] ) )
+ $ret['params']['lang'] = $ret['lang'];
+ if( !isset( $ret['params']['site'] ) && !is_null( $ret['suffix'] ) )
+ $ret['params']['site'] = $ret['suffix'];
+
+ return $ret;