Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Lib\FederatedProperties\FederatedPropertyId Class Reference
+ Inheritance diagram for Wikibase\Lib\FederatedProperties\FederatedPropertyId:
+ Collaboration diagram for Wikibase\Lib\FederatedProperties\FederatedPropertyId:

Public Member Functions

 __construct (string $uriSerialization, string $remoteId)
 
 __serialize ()
 This method replaces Serializable::serialize().
 
 __unserialize (array $data)
 This method replaces Serializable::unserialize().
 
 getEntityType ()
 
 getRemoteIdSerialization ()
 The ID as it is referred to on the federation source, e.g.
 
 getSerialization ()
 
 __toString ()
 TODO: Consider removing this method in favor of just always calling getSerialization().
 
 equals ( $target)
 

Static Private Member Functions

static assertValidSerialization (string $serialization)
 

Private Attributes

 $serialization
 
 $remoteId
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Lib\FederatedProperties\FederatedPropertyId::__construct ( string $uriSerialization,
string $remoteId )
Parameters
string$uriSerializationThe concept URI serialization of the ID
string$remoteIdThe ID as it is referred to on the federation source, e.g. 'P31' for serialization 'http://www.wikidata.org/entity/P31'.

Member Function Documentation

◆ __serialize()

Wikibase\Lib\FederatedProperties\FederatedPropertyId::__serialize ( )

This method replaces Serializable::serialize().

Do not call it manually. Also, consider using getSerialization() and an EntityIdParser instead of PHP serialization.

See also
https://www.php.net/manual/en/language.oop5.magic.php#object.serialize

Implements Wikibase\DataModel\Entity\EntityId.

◆ __toString()

Wikibase\Lib\FederatedProperties\FederatedPropertyId::__toString ( )

TODO: Consider removing this method in favor of just always calling getSerialization().

Returns
string

Implements Wikibase\DataModel\Entity\EntityId.

◆ __unserialize()

Wikibase\Lib\FederatedProperties\FederatedPropertyId::__unserialize ( array $data)

This method replaces Serializable::unserialize().

Do not call it manually. Also, consider using getSerialization() and an EntityIdParser instead of PHP serialization.

See also
https://www.php.net/manual/en/language.oop5.magic.php#object.unserialize

Implements Wikibase\DataModel\Entity\EntityId.

◆ assertValidSerialization()

static Wikibase\Lib\FederatedProperties\FederatedPropertyId::assertValidSerialization ( string $serialization)
staticprivate

◆ equals()

Wikibase\Lib\FederatedProperties\FederatedPropertyId::equals ( $target)
Parameters
mixed$target
Returns
bool

Implements Wikibase\DataModel\Entity\EntityId.

◆ getEntityType()

Wikibase\Lib\FederatedProperties\FederatedPropertyId::getEntityType ( )
Returns
string

Implements Wikibase\DataModel\Entity\EntityId.

◆ getRemoteIdSerialization()

Wikibase\Lib\FederatedProperties\FederatedPropertyId::getRemoteIdSerialization ( )

The ID as it is referred to on the federation source, e.g.

'P31' for serialization 'http://www.wikidata.org/entity/P31'.

This method must only be used when communicating with the federation source, but never to represent a FederatedPropertyId locally, because removing the concept base URI prefix makes the ID ambiguous.

◆ getSerialization()

Wikibase\Lib\FederatedProperties\FederatedPropertyId::getSerialization ( )
Returns
string

Implements Wikibase\DataModel\Entity\EntityId.

Member Data Documentation

◆ $remoteId

Wikibase\Lib\FederatedProperties\FederatedPropertyId::$remoteId
private

◆ $serialization

Wikibase\Lib\FederatedProperties\FederatedPropertyId::$serialization
private

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