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