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

Public Member Functions

 __construct (EntityId $entityId)
 
 getHash ()
 
 getSerializationForHash ()
 The serialization to use for hashing, for compatibility reasons this is equivalent to the old (pre 7.4) PHP serialization.
 
 __serialize ()
 
 serialize ()
 
 __unserialize (array $data)
 
 unserialize ( $serialized)
 
 getSortKey ()
 
 getValue ()
 
 getEntityId ()
 
 getArrayValue ()
 

Static Public Member Functions

static getType ()
 
static newFromArray ( $data)
 Constructs a new instance from the provided data.
 

Static Private Member Functions

static newIdFromTypeAndNumber ( $entityType, $numericId)
 

Private Attributes

 $entityId
 

Detailed Description

Since
0.5
Author
Jeroen De Dauw < jeroe.nosp@m.nded.nosp@m.auw@g.nosp@m.mail.nosp@m..com >
Thiemo Kreuz
Daniel Kinzler

Constructor & Destructor Documentation

◆ __construct()

Wikibase\DataModel\Entity\EntityIdValue::__construct ( EntityId $entityId)

Member Function Documentation

◆ __serialize()

Wikibase\DataModel\Entity\EntityIdValue::__serialize ( )

◆ __unserialize()

Wikibase\DataModel\Entity\EntityIdValue::__unserialize ( array $data)

◆ getArrayValue()

Wikibase\DataModel\Entity\EntityIdValue::getArrayValue ( )
See also
DataValue::getArrayValue
Returns
array

◆ getEntityId()

Wikibase\DataModel\Entity\EntityIdValue::getEntityId ( )
Returns
EntityId

◆ getHash()

Wikibase\DataModel\Entity\EntityIdValue::getHash ( )
Returns
string

◆ getSerializationForHash()

Wikibase\DataModel\Entity\EntityIdValue::getSerializationForHash ( )

The serialization to use for hashing, for compatibility reasons this is equivalent to the old (pre 7.4) PHP serialization.

Returns
string

◆ getSortKey()

Wikibase\DataModel\Entity\EntityIdValue::getSortKey ( )
Deprecated
Kept for compatibility with older DataValues versions. Do not use.
Returns
string|float|int

◆ getType()

static Wikibase\DataModel\Entity\EntityIdValue::getType ( )
static
See also
DataValue::getType
Returns
string

◆ getValue()

Wikibase\DataModel\Entity\EntityIdValue::getValue ( )
See also
DataValue::getValue
Returns
self

◆ newFromArray()

static Wikibase\DataModel\Entity\EntityIdValue::newFromArray ( $data)
static

Constructs a new instance from the provided data.

Required for

See also
DataValueDeserializer. This is expected to round-trip with
getArrayValue.
Deprecated
since 7.1. Static DataValue::newFromArray constructors like this are underspecified (not in the DataValue interface), and misleadingly named (should be named newFromArrayValue). Instead, use DataValue builder callbacks in
See also
DataValueDeserializer.
Parameters
mixed$dataWarning! Even if this is expected to be a value as returned by
See also
getArrayValue, callers of this specific newFromArray implementation can not guarantee this. This is not even guaranteed to be an array!
Exceptions
IllegalValueExceptionif $data is not in the expected format. Subclasses of InvalidArgumentException are expected and properly handled by
See also
DataValueDeserializer.
Returns
self

◆ newIdFromTypeAndNumber()

static Wikibase\DataModel\Entity\EntityIdValue::newIdFromTypeAndNumber ( $entityType,
$numericId )
staticprivate
Parameters
string$entityType
int | float | string$numericId
Exceptions
IllegalValueException
Returns
self

◆ serialize()

Wikibase\DataModel\Entity\EntityIdValue::serialize ( )
See also
Serializable::serialize
Since
7.0 serialization format changed in an incompatible way
Note
Do not use PHP serialization for persistence! Use a DataValueSerializer instead.
Returns
string

◆ unserialize()

Wikibase\DataModel\Entity\EntityIdValue::unserialize ( $serialized)
See also
Serializable::unserialize
Parameters
string$serialized
Exceptions
IllegalValueException

Member Data Documentation

◆ $entityId

Wikibase\DataModel\Entity\EntityIdValue::$entityId
private

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