A factory for SnakFormatters in a client context, to be reused in different methods that "access
repository data" from a client (typically parser functions and Lua scripts).
More...
A factory for SnakFormatters in a client context, to be reused in different methods that "access
repository data" from a client (typically parser functions and Lua scripts).
- Copyright
- GPL-2.0-or-later
- Author
- Katie Filbert < aude..nosp@m.wiki.nosp@m.@gmai.nosp@m.l.co.nosp@m.m >
-
Marius Hoch
◆ __construct()
◆ getPlainTextSnakFormatterForOptions()
Wikibase\Client\DataAccess\DataAccessSnakFormatterFactory::getPlainTextSnakFormatterForOptions |
( |
FormatterOptions |
$options | ) |
|
|
private |
Our output format is basically wikitext escaped plain text, except for URLs, these are not wikitext escaped.
- Parameters
-
- Returns
- BinaryOptionDispatchingSnakFormatter
◆ getRichWikitextSnakFormatterForOptions()
Wikibase\Client\DataAccess\DataAccessSnakFormatterFactory::getRichWikitextSnakFormatterForOptions |
( |
FormatterOptions |
$options | ) |
|
|
private |
- Parameters
-
- Returns
- EscapingSnakFormatter
◆ newWikitextSnakFormatter()
Wikibase\Client\DataAccess\DataAccessSnakFormatterFactory::newWikitextSnakFormatter |
( |
Language |
$language, |
|
|
UsageAccumulator |
$usageAccumulator, |
|
|
|
$type = self::TYPE_ESCAPED_PLAINTEXT |
|
) |
| |
This returns a SnakFormatter that will return either "rich" wikitext, or wikitext escaped plain text.
The only exception are URLs, these are not escaped but plain text.
- Parameters
-
Language | $language | |
UsageAccumulator | $usageAccumulator | |
string | $type | One of DataAccessSnakFormatterFactory::TYPE_* |
- Returns
- SnakFormatter
◆ $languageFallbackChainFactory
Wikibase\Client\DataAccess\DataAccessSnakFormatterFactory::$languageFallbackChainFactory |
|
private |
◆ $languageFallbackLabelDescriptionLookupFactory
Wikibase\Client\DataAccess\DataAccessSnakFormatterFactory::$languageFallbackLabelDescriptionLookupFactory |
|
private |
◆ $propertyDataTypeLookup
Wikibase\Client\DataAccess\DataAccessSnakFormatterFactory::$propertyDataTypeLookup |
|
private |
◆ $repoItemUriParser
Wikibase\Client\DataAccess\DataAccessSnakFormatterFactory::$repoItemUriParser |
|
private |
◆ $snakFormatterFactory
Wikibase\Client\DataAccess\DataAccessSnakFormatterFactory::$snakFormatterFactory |
|
private |
◆ $trackUsagesInAllLanguages
Wikibase\Client\DataAccess\DataAccessSnakFormatterFactory::$trackUsagesInAllLanguages |
|
private |
◆ TYPE_ESCAPED_PLAINTEXT
const Wikibase\Client\DataAccess\DataAccessSnakFormatterFactory::TYPE_ESCAPED_PLAINTEXT = 'escaped-plaintext' |
A plain text format, escaped for wikitext.
Values are formatted in simple, textual formats, and any wikitext syntax they might contain (e. g. in string values) is escaped. The only exception are URLs, which are not escaped.
◆ TYPE_RICH_WIKITEXT
const Wikibase\Client\DataAccess\DataAccessSnakFormatterFactory::TYPE_RICH_WIKITEXT = 'rich-wikitext' |
A rich wikitext format.
Values may contain markup, such as hyperlinks or <span>
s with language tags. Individual formatters still wikitext-escape their contents as needed (e. g. for strings). The result is always wrapped in an outer <span>
.
The documentation for this class was generated from the following file: