Wikibase
MediaWiki Wikibase extension
Wikibase\DataModel\Entity\BasicEntityIdParser Class Reference

Object that can parse the serializations of the EntityIds defined by the DataModel. More...

+ Inheritance diagram for Wikibase\DataModel\Entity\BasicEntityIdParser:
+ Collaboration diagram for Wikibase\DataModel\Entity\BasicEntityIdParser:

Public Member Functions

 __construct ()
 
 parse ( $idSerialization)
 

Static Public Member Functions

static getBuilders ()
 Returns an id builders array. More...
 

Private Attributes

 $idParser
 

Detailed Description

Object that can parse the serializations of the EntityIds defined by the DataModel.

Since
4.2
Author
Jeroen De Dauw < jeroe.nosp@m.nded.nosp@m.auw@g.nosp@m.mail.nosp@m..com >

Constructor & Destructor Documentation

◆ __construct()

Wikibase\DataModel\Entity\BasicEntityIdParser::__construct ( )

Member Function Documentation

◆ getBuilders()

static Wikibase\DataModel\Entity\BasicEntityIdParser::getBuilders ( )
static

Returns an id builders array.

Keys are preg_match patterns, values are callables. (See the DispatchingEntityIdParser constructor for more details.)

This method returns builders for the ids of all entity types defined by WikibaseDataModel. It is intended to be used by applications that allow for registration of additional entity types, and thus want to extend upon this list. The extended list can then be used to construct a DispatchingEntityIdParser instance.

Returns
callable[]

◆ parse()

Wikibase\DataModel\Entity\BasicEntityIdParser::parse (   $idSerialization)
Parameters
string$idSerialization
Returns
ItemId|PropertyId
Exceptions
EntityIdParsingException

Implements Wikibase\DataModel\Entity\EntityIdParser.

Member Data Documentation

◆ $idParser

Wikibase\DataModel\Entity\BasicEntityIdParser::$idParser
private

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