Wikibase
MediaWiki Wikibase extension
|
Public Member Functions | |
__construct ( $idSerialization) | |
getNumericId () | |
getEntityType () | |
serialize () | |
unserialize ( $serialized) | |
Public Member Functions inherited from Wikibase\DataModel\Entity\SerializableEntityId | |
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 SerializableEntityId::getRepositoryName returns a non-empty string. More... | |
__toString () | |
This is a human readable representation of the EntityId. More... | |
equals ( $target) | |
Static Public Member Functions | |
static | newFromNumber ( $numericId) |
Construct a NumericPropertyId 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\SerializableEntityId | |
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 SerializableEntityId::splitSerialization. More... | |
Public Attributes | |
const | PATTERN = '/^P[1-9]\d{0,9}\z/i' |
Public Attributes inherited from Wikibase\DataModel\Entity\SerializableEntityId | |
const | PATTERN = '/^:?(\w+:)*[^:]+\z/' |
Public Attributes inherited from Wikibase\DataModel\Entity\Int32EntityId | |
const | MAX = 2147483647 |
Private Member Functions | |
assertValidIdFormat ( $idSerialization) | |
Additional Inherited Members | |
Static Protected Member Functions inherited from Wikibase\DataModel\Entity\SerializableEntityId | |
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\SerializableEntityId | |
$serialization | |
$repositoryName | |
$localPart | |
Wikibase\DataModel\Entity\NumericPropertyId::__construct | ( | $idSerialization | ) |
string | $idSerialization |
InvalidArgumentException |
Reimplemented from Wikibase\DataModel\Entity\SerializableEntityId.
|
private |
Wikibase\DataModel\Entity\NumericPropertyId::getEntityType | ( | ) |
Reimplemented from Wikibase\DataModel\Entity\SerializableEntityId.
Wikibase\DataModel\Entity\NumericPropertyId::getNumericId | ( | ) |
Implements Wikibase\DataModel\Entity\Int32EntityId.
|
static |
Construct a NumericPropertyId given the numeric part of its serialization.
CAUTION: new usages of this method are discouraged. Typically you should avoid dealing with just the numeric part, and use the whole serialization. Not doing so in new code requires special justification.
int | float | string | $numericId |
InvalidArgumentException |
|
static |
CAUTION: Use the full string serialization whenever you can and avoid using numeric IDs.
string | $repositoryName | |
int | float | string | $numericId |
InvalidArgumentException |
Wikibase\DataModel\Entity\NumericPropertyId::serialize | ( | ) |
Wikibase\DataModel\Entity\NumericPropertyId::unserialize | ( | $serialized | ) |
string | $serialized |
const Wikibase\DataModel\Entity\NumericPropertyId::PATTERN = '/^P[1-9]\d{0,9}\z/i' |