Builds ValueParser objects.
More...
|
| __construct (array $valueParsers) |
|
| getParserIds () |
| Returns the ValueParser identifiers. More...
|
|
| newParser ( $parserId, ParserOptions $parserOptions) |
| Returns an instance of the ValueParser with the provided id or null if there is no such ValueParser. More...
|
|
Builds ValueParser objects.
- Copyright
- GPL-2.0-or-later
- Author
- Jeroen De Dauw < jeroe.nosp@m.nded.nosp@m.auw@g.nosp@m.mail.nosp@m..com >
-
Daniel Kinzler
◆ __construct()
Wikibase\Repo\ValueParserFactory::__construct |
( |
array |
$valueParsers | ) |
|
- Parameters
-
callable[] | $valueParsers | An associative array mapping parser ids to factory functions. |
- Exceptions
-
◆ getParserIds()
Wikibase\Repo\ValueParserFactory::getParserIds |
( |
| ) |
|
Returns the ValueParser identifiers.
- Returns
- string[]
◆ instantiateParser()
Wikibase\Repo\ValueParserFactory::instantiateParser |
( |
|
$builder, |
|
|
ParserOptions |
$options |
|
) |
| |
|
private |
- Parameters
-
callable | $builder | A callable that returns a ValueParser. $options will be passed to the constructor or callable, respectively. |
ParserOptions | $options | |
- Exceptions
-
LogicException | if the builder did not create a ValueParser |
- Returns
- ValueParser
◆ newParser()
Wikibase\Repo\ValueParserFactory::newParser |
( |
|
$parserId, |
|
|
ParserOptions |
$parserOptions |
|
) |
| |
Returns an instance of the ValueParser with the provided id or null if there is no such ValueParser.
- Parameters
-
string | $parserId | |
ParserOptions | $parserOptions | |
- Exceptions
-
OutOfBoundsException | If no parser was registered for $parserId |
- Returns
- ValueParser
◆ $parsers
Wikibase\Repo\ValueParserFactory::$parsers = [] |
|
private |
The documentation for this class was generated from the following file: