Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\DataModel\Entity\SerializableEntityId Class Reference
+ Inheritance diagram for Wikibase\DataModel\Entity\SerializableEntityId:
+ Collaboration diagram for Wikibase\DataModel\Entity\SerializableEntityId:

Public Member Functions

 __construct ( $serialization)
 
 getEntityType ()
 
 getSerialization ()
 
 __toString ()
 This is a human readable representation of the EntityId.
 
 equals ( $target)
 
 __serialize ()
 This method replaces Serializable::serialize().
 
 __unserialize (array $serialized)
 This method replaces Serializable::unserialize().
 

Public Attributes

const PATTERN = '/^[^:]+\z/'
 

Protected Attributes

 $serialization
 

Static Private Member Functions

static assertValidSerialization ( $serialization)
 
static normalizeIdSerialization ( $id)
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

Wikibase\DataModel\Entity\SerializableEntityId::__construct ( $serialization)
Parameters
string$serialization
Exceptions
InvalidArgumentException

Reimplemented in Wikibase\DataModel\Entity\ItemId, and Wikibase\DataModel\Entity\NumericPropertyId.

Member Function Documentation

◆ __serialize()

Wikibase\DataModel\Entity\SerializableEntityId::__serialize ( )
abstract

◆ __toString()

Wikibase\DataModel\Entity\SerializableEntityId::__toString ( )

This is a human readable representation of the EntityId.

This format is allowed to change and should therefore not be relied upon to be stable.

Returns
string

Implements Wikibase\DataModel\Entity\EntityId.

◆ __unserialize()

Wikibase\DataModel\Entity\SerializableEntityId::__unserialize ( array $data)
abstract

◆ assertValidSerialization()

static Wikibase\DataModel\Entity\SerializableEntityId::assertValidSerialization ( $serialization)
staticprivate

◆ equals()

Wikibase\DataModel\Entity\SerializableEntityId::equals ( $target)
Parameters
mixed$target
Returns
bool

Implements Wikibase\DataModel\Entity\EntityId.

◆ getEntityType()

Wikibase\DataModel\Entity\SerializableEntityId::getEntityType ( )
abstract

◆ getSerialization()

Wikibase\DataModel\Entity\SerializableEntityId::getSerialization ( )
Returns
string

Implements Wikibase\DataModel\Entity\EntityId.

◆ normalizeIdSerialization()

static Wikibase\DataModel\Entity\SerializableEntityId::normalizeIdSerialization ( $id)
staticprivate
Parameters
string$id
Returns
string

Member Data Documentation

◆ $serialization

Wikibase\DataModel\Entity\SerializableEntityId::$serialization
protected

◆ PATTERN

const Wikibase\DataModel\Entity\SerializableEntityId::PATTERN = '/^[^:]+\z/'

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