Class to parse localized era from values.
More...
|
| parseEra ( $value, Language $language) |
| Try to parse era from the value in the given language.
|
|
| getRegexpFromMessageText ( $msgText) |
| Transform the message to a pattern we can match era against.
|
|
Class to parse localized era from values.
◆ __construct()
Wikibase\Repo\Parsers\MwEraParser::__construct |
( |
ParserOptions |
$options | ) |
|
◆ getRegexpFromMessageText()
Wikibase\Repo\Parsers\MwEraParser::getRegexpFromMessageText |
( |
|
$msgText | ) |
|
|
private |
Transform the message to a pattern we can match era against.
- Parameters
-
- Returns
- string
◆ parseEra()
Wikibase\Repo\Parsers\MwEraParser::parseEra |
( |
|
$value, |
|
|
Language |
$language |
|
) |
| |
|
private |
Try to parse era from the value in the given language.
- Parameters
-
string | $value | |
Language | $language | |
- Returns
- string[]|null
◆ stringParse()
Wikibase\Repo\Parsers\MwEraParser::stringParse |
( |
|
$value | ) |
|
|
protected |
- Parameters
-
- Exceptions
-
- Returns
- string[] Array of the parsed era constant and the value with the era stripped.
◆ $lang
Wikibase\Repo\Parsers\MwEraParser::$lang |
|
private |
◆ FORMAT_NAME
const Wikibase\Repo\Parsers\MwEraParser::FORMAT_NAME = 'mw-era' |
◆ MESSAGE_KEY
const Wikibase\Repo\Parsers\MwEraParser::MESSAGE_KEY = 'wikibase-time-precision-BCE' |
The documentation for this class was generated from the following file: