Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
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\Repo\MediaWikiLocalizedTextProvider, and Wikibase\View\DummyLocalizedTextProvider.

◆ 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\Repo\MediaWikiLocalizedTextProvider, and Wikibase\View\DummyLocalizedTextProvider.

◆ 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\Repo\MediaWikiLocalizedTextProvider, and Wikibase\View\DummyLocalizedTextProvider.

◆ has()

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

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


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