Wikibase
MediaWiki Wikibase extension
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 ()
 
 unserialize ( $serialization)
 
 getEntityType ()
 
 getRemoteIdSerialization ()
 The ID as it is referred to on the federation source, e.g. More...
 
 getSerialization ()
 
 __toString ()
 TODO: Consider removing this method in favor of just always calling getSerialization(). More...
 
 equals ( $target)
 
 getLocalPart ()
 TODO: This method shouldn't exist on this interface as it doesn't make sense for certain types of IDs. More...
 
 getRepositoryName ()
 TODO: This method shouldn't exist on this interface as it doesn't make sense for certain types of IDs. More...
 

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

◆ __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.

◆ 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.

◆ getLocalPart()

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

TODO: This method shouldn't exist on this interface as it doesn't make sense for certain types of IDs.

It should be moved to a separate interface, or removed altogether.

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.

◆ getRepositoryName()

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

TODO: This method shouldn't exist on this interface as it doesn't make sense for certain types of IDs.

It should be moved to a separate interface, or removed altogether.

Returns
string

Implements Wikibase\DataModel\Entity\EntityId.

◆ getSerialization()

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

Implements Wikibase\DataModel\Entity\EntityId.

◆ serialize()

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

◆ unserialize()

Wikibase\Lib\FederatedProperties\FederatedPropertyId::unserialize (   $serialization)

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: