* @param array $flags Defining the custom strings that maps to the flags
* @param array $manualLevel Limit for supported variants
*/
* @param array $flags Defining the custom strings that maps to the flags
* @param array $manualLevel Limit for supported variants
*/
- public function __construct( $langobj, $maincode, $variants = [],
+ public function __construct( Language $langobj, $maincode, $variants = [],
$variantfallbacks = [], $flags = [],
$manualLevel = [] ) {
global $wgDisabledVariants;
$variantfallbacks = [], $flags = [],
$manualLevel = [] ) {
global $wgDisabledVariants;
* @return mixed Variant if one found, null otherwise
*/
protected function getUserVariant() {
* @return mixed Variant if one found, null otherwise
*/
protected function getUserVariant() {
$ret = $wgUser->getOption( 'variant' );
} else {
$ret = $wgUser->getOption( 'variant-' . $this->mMainLanguageCode );
$ret = $wgUser->getOption( 'variant' );
} else {
$ret = $wgUser->getOption( 'variant-' . $this->mMainLanguageCode );
}
// Recursively parse another rule
$inner .= $this->recursiveConvertRule( $text, $variant, $startPos, $depth + 1 );
}
// Recursively parse another rule
$inner .= $this->recursiveConvertRule( $text, $variant, $startPos, $depth + 1 );