Wikibase
MediaWiki Wikibase extension
Wikibase\View\LocalizedTextProvider Interface Reference

A service providing localized texts for keys. More...

+ Inheritance diagram for Wikibase\View\LocalizedTextProvider:

Public Member Functions

 get ( $key, array $params=[])
 
 getEscaped ( $key, array $params=[])
 
 has ( $key)
 
 getLanguageOf ( $key)
 

Detailed Description

A service providing localized texts for keys.

These are meant to be plain text results, i.e. no markup.

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

Member Function Documentation

◆ get()

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

Implemented in Wikibase\View\DummyLocalizedTextProvider, and Wikibase\Repo\MediaWikiLocalizedTextProvider.

◆ getEscaped()

Wikibase\View\LocalizedTextProvider::getEscaped (   $key,
array  $params = [] 
)
Parameters
string$key
array<string|RawMessageParameter>$params Parameters that could be used for generating the text
Returns
string The HTML-escaped localized text

Implemented in Wikibase\View\DummyLocalizedTextProvider, and Wikibase\Repo\MediaWikiLocalizedTextProvider.

◆ getLanguageOf()

Wikibase\View\LocalizedTextProvider::getLanguageOf (   $key)
Parameters
string$key
Returns
string The language code of the text returned for a specific key

Implemented in Wikibase\View\DummyLocalizedTextProvider, and Wikibase\Repo\MediaWikiLocalizedTextProvider.

◆ has()

Wikibase\View\LocalizedTextProvider::has (   $key)
Parameters
string$key
Returns
bool

Implemented in Wikibase\View\DummyLocalizedTextProvider, and Wikibase\Repo\MediaWikiLocalizedTextProvider.


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