|
Wikibase
MediaWiki Wikibase extension
|
SnakFormatter decorator that preprocesses any Wikitext it produces. More...
Inheritance diagram for Wikibase\Client\DataAccess\Scribunto\WikitextPreprocessingSnakFormatter:
Collaboration diagram for Wikibase\Client\DataAccess\Scribunto\WikitextPreprocessingSnakFormatter:Public Member Functions | |
| __construct (SnakFormatter $snakFormatter, Parser $parser) | |
| formatSnak (Snak $snak) | |
| getFormat () | |
| Returns the format ID of the format this formatter generates. | |
Private Attributes | |
| $snakFormatter | |
| $parser | |
Additional Inherited Members | |
Public Attributes inherited from Wikibase\Lib\Formatters\SnakFormatter | |
| const | OPT_LANG = ValueFormatter::OPT_LANG |
| Options key for controlling the output language. | |
| const | FORMAT_PLAIN = 'text/plain' |
| Output format types. | |
| const | FORMAT_WIKI = 'text/x-wiki' |
| const | FORMAT_HTML = 'text/html' |
| const | FORMAT_HTML_DIFF = 'text/html; disposition=diff' |
| const | FORMAT_HTML_VERBOSE = 'text/html; disposition=verbose' |
| const | FORMAT_HTML_VERBOSE_PREVIEW = 'text/html; disposition=verbose-preview' |
| const | OPT_ON_ERROR = 'on-error' |
| Options key for controlling error handling. | |
| const | ON_ERROR_WARN = 'warn' |
| Value for the OPT_ON_ERROR option indicating that recoverable errors should cause a warning to be show to the user. | |
| const | ON_ERROR_FAIL = 'fail' |
| Value for the OPT_ON_ERROR option indicating that recoverable errors should cause the formatting to fail with an exception. | |
SnakFormatter decorator that preprocesses any Wikitext it produces.
This is needed in order to pass certain Wikitext constructs (extension tags, like "<maplink>") to Scribunto.
| Wikibase\Client\DataAccess\Scribunto\WikitextPreprocessingSnakFormatter::__construct | ( | SnakFormatter | $snakFormatter, |
| Parser | $parser ) |
| Wikibase\Client\DataAccess\Scribunto\WikitextPreprocessingSnakFormatter::formatSnak | ( | Snak | $snak | ) |
| Snak | $snak |
Implements Wikibase\Lib\Formatters\SnakFormatter.
| Wikibase\Client\DataAccess\Scribunto\WikitextPreprocessingSnakFormatter::getFormat | ( | ) |
Returns the format ID of the format this formatter generates.
This uses the FORMAT_XXX constants defined in OutputFormatSnakFormatterFactory.
Implements Wikibase\Lib\Formatters\SnakFormatter.
|
private |
|
private |