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...
 
- Public Member Functions inherited from Wikibase\DataModel\Entity\PropertyId
 __construct ( $idSerialization)
 
 getNumericId ()
 
- Public Member Functions inherited from Wikibase\DataModel\Entity\EntityId
 getSerialization ()
 
 getRepositoryName ()
 Returns '' for local IDs and the foreign repository name for foreign IDs. More...
 
 getLocalPart ()
 Returns the serialization without the first repository prefix. More...
 
 isForeign ()
 Returns true iff EntityId::getRepositoryName returns a non-empty string. More...
 
 __toString ()
 This is a human readable representation of the EntityId. More...
 
 equals ( $target)
 

Static Private Member Functions

static assertValidSerialization (string $serialization)
 

Private Attributes

 $remoteId
 

Additional Inherited Members

- Static Public Member Functions inherited from Wikibase\DataModel\Entity\PropertyId
static newFromNumber ( $numericId)
 Construct a PropertyId given the numeric part of its serialization. More...
 
static newFromRepositoryAndNumber ( $repositoryName, $numericId)
 CAUTION: Use the full string serialization whenever you can and avoid using numeric IDs. More...
 
- Static Public Member Functions inherited from Wikibase\DataModel\Entity\EntityId
static splitSerialization ( $serialization)
 Returns an array with 3 elements: the foreign repository name as the first element, the local ID as the last element and everything that is in between as the second element. More...
 
static joinSerialization (array $parts)
 Builds an ID serialization from the parts returned by EntityId::splitSerialization. More...
 
- Public Attributes inherited from Wikibase\DataModel\Entity\PropertyId
const PATTERN = '/^P[1-9]\d{0,9}\z/i'
 
- Public Attributes inherited from Wikibase\DataModel\Entity\EntityId
const PATTERN = '/^:?(\w+:)*[^:]+\z/'
 
- Public Attributes inherited from Wikibase\DataModel\Entity\Int32EntityId
const MAX = 2147483647
 
- Static Protected Member Functions inherited from Wikibase\DataModel\Entity\EntityId
static extractRepositoryNameAndLocalPart ( $serialization)
 Returns a pair (repository name, local part of ID) from the given ID serialization. More...
 
- Protected Attributes inherited from Wikibase\DataModel\Entity\EntityId
 $serialization
 
 $repositoryName
 
 $localPart
 

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

◆ assertValidSerialization()

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

◆ getEntityType()

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

Reimplemented from Wikibase\DataModel\Entity\PropertyId.

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

◆ serialize()

Wikibase\Lib\FederatedProperties\FederatedPropertyId::serialize ( )
See also
Serializable::serialize
Since
7.0 serialization format changed in an incompatible way
Returns
string

Reimplemented from Wikibase\DataModel\Entity\PropertyId.

◆ unserialize()

Wikibase\Lib\FederatedProperties\FederatedPropertyId::unserialize (   $serialized)
See also
Serializable::unserialize
Parameters
string$serialized

Reimplemented from Wikibase\DataModel\Entity\PropertyId.

Member Data Documentation

◆ $remoteId

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

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