|
static | newFromNumber ( $numericId) |
| Construct an ItemId given the numeric part of its serialization.
|
|
static | newFromRepositoryAndNumber ( $repositoryName, $numericId) |
| CAUTION: Use the full string serialization whenever you can and avoid using numeric IDs.
|
|
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.
|
|
static | joinSerialization (array $parts) |
| Builds an ID serialization from the parts returned by SerializableEntityId::splitSerialization.
|
|
|
const | PATTERN = '/^Q[1-9]\d{0,9}\z/i' |
|
const | PATTERN = '/^:?(\w+:)*[^:]+\z/' |
|
const | MAX = 2147483647 |
|
- Since
- 0.5
- Copyright
- GPL-2.0-or-later
◆ __construct()
Wikibase\DataModel\Entity\ItemId::__construct |
( |
| $idSerialization | ) |
|
◆ __serialize()
Wikibase\DataModel\Entity\ItemId::__serialize |
( |
| ) |
|
◆ __unserialize()
Wikibase\DataModel\Entity\ItemId::__unserialize |
( |
array | $data | ) |
|
◆ assertValidIdFormat()
Wikibase\DataModel\Entity\ItemId::assertValidIdFormat |
( |
| $idSerialization | ) |
|
|
private |
◆ getEntityType()
Wikibase\DataModel\Entity\ItemId::getEntityType |
( |
| ) |
|
◆ getNumericId()
Wikibase\DataModel\Entity\ItemId::getNumericId |
( |
| ) |
|
◆ newFromNumber()
static Wikibase\DataModel\Entity\ItemId::newFromNumber |
( |
| $numericId | ) |
|
|
static |
Construct an ItemId 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.
- Parameters
-
int | float | string | $numericId | |
- Returns
- self
- Exceptions
-
◆ newFromRepositoryAndNumber()
static Wikibase\DataModel\Entity\ItemId::newFromRepositoryAndNumber |
( |
| $repositoryName, |
|
|
| $numericId ) |
|
static |
CAUTION: Use the full string serialization whenever you can and avoid using numeric IDs.
- Since
- 7.0
- Parameters
-
string | $repositoryName | |
int | float | string | $numericId | |
- Returns
- self
- Exceptions
-
◆ serialize()
Wikibase\DataModel\Entity\ItemId::serialize |
( |
| ) |
|
- See also
- Serializable::serialize
- Since
- 7.0 serialization format changed in an incompatible way
- Returns
- string
◆ unserialize()
Wikibase\DataModel\Entity\ItemId::unserialize |
( |
| $serialized | ) |
|
- See also
- Serializable::unserialize
- Parameters
-
◆ PATTERN
const Wikibase\DataModel\Entity\ItemId::PATTERN = '/^Q[1-9]\d{0,9}\z/i' |
The documentation for this class was generated from the following file:
- lib/packages/wikibase/data-model/src/Entity/ItemId.php