Wikibase
MediaWiki Wikibase extension
Wikibase\DataModel\Services\EntityId\PrefixMappingEntityIdParserFactory Class Reference

Public Member Functions

 __construct (EntityIdParser $parser, array $idPrefixMapping)
 
 getIdParser ( $repository)
 Create a PrefixMappingEntityIdParser for the particular repository using id prefix mappings defined in the constructor. More...
 

Private Member Functions

 newIdParserForRepository ( $repository)
 

Private Attributes

 $idPrefixMapping
 
 $parser
 
 $parsers = []
 

Detailed Description

Since
3.7

Constructor & Destructor Documentation

◆ __construct()

Wikibase\DataModel\Services\EntityId\PrefixMappingEntityIdParserFactory::__construct ( EntityIdParser  $parser,
array  $idPrefixMapping 
)
Since
3.7
Parameters
EntityIdParser$parser
array[]$idPrefixMappingAn associative array mapping repository names (strings) to id serialization prefix mappings specific to the particular repository (
See also
PrefixMappingEntityIdParser). If an empty-string key is provided in the mapping for some repository, its value must be the same as the repository name.
Exceptions
ParameterAssertionException

Member Function Documentation

◆ getIdParser()

Wikibase\DataModel\Services\EntityId\PrefixMappingEntityIdParserFactory::getIdParser (   $repository)

Create a PrefixMappingEntityIdParser for the particular repository using id prefix mappings defined in the constructor.

Since
3.7
Parameters
string$repository
Returns
PrefixMappingEntityIdParser
Exceptions
ParameterAssertionException

◆ newIdParserForRepository()

Wikibase\DataModel\Services\EntityId\PrefixMappingEntityIdParserFactory::newIdParserForRepository (   $repository)
private
Parameters
string$repository
Returns
PrefixMappingEntityIdParser
Exceptions
ParameterAssertionException

Member Data Documentation

◆ $idPrefixMapping

Wikibase\DataModel\Services\EntityId\PrefixMappingEntityIdParserFactory::$idPrefixMapping
private

◆ $parser

Wikibase\DataModel\Services\EntityId\PrefixMappingEntityIdParserFactory::$parser
private

◆ $parsers

Wikibase\DataModel\Services\EntityId\PrefixMappingEntityIdParserFactory::$parsers = []
private

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