Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Repo\MediaWikiLocalizedTextProvider Class Reference

A LocalizedTextProvider wrapping MediaWiki's message system. More...

+ Inheritance diagram for Wikibase\Repo\MediaWikiLocalizedTextProvider:
+ Collaboration diagram for Wikibase\Repo\MediaWikiLocalizedTextProvider:

Public Member Functions

 __construct (Language $language)
 
 get ( $key, array $params=[])
 
 has ( $key)
 
 getLanguageOf ( $key)
 

Private Attributes

 $language
 

Detailed Description

A LocalizedTextProvider wrapping MediaWiki's message system.

Author
Adrian Heine adria.nosp@m.n.he.nosp@m.ine@w.nosp@m.ikim.nosp@m.edia..nosp@m.de

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\MediaWikiLocalizedTextProvider::__construct ( Language  $language)
Parameters
Language$language

Member Function Documentation

◆ get()

Wikibase\Repo\MediaWikiLocalizedTextProvider::get (   $key,
array  $params = [] 
)
Parameters
string$key
string[]$paramsParameters that could be used for generating the text
Returns
string The localized text

Implements Wikibase\View\LocalizedTextProvider.

◆ getLanguageOf()

Wikibase\Repo\MediaWikiLocalizedTextProvider::getLanguageOf (   $key)
Parameters
string$keyCurrently ignored
Returns
string The language code of the text returned for a specific key.

Implements Wikibase\View\LocalizedTextProvider.

◆ has()

Wikibase\Repo\MediaWikiLocalizedTextProvider::has (   $key)
Parameters
string$key
Returns
bool

Implements Wikibase\View\LocalizedTextProvider.

Member Data Documentation

◆ $language

Wikibase\Repo\MediaWikiLocalizedTextProvider::$language
private

The documentation for this class was generated from the following file: