Constructs EntityId objects from entity type identifiers and unique parts of entity ID serializations.
More...
Constructs EntityId objects from entity type identifiers and unique parts of entity ID serializations.
The unique part is typically the numeric part of an entity ID, excluding the static part that's the same for all IDs of that type.
Meant to be the counterpart for
- See also
- Int32EntityId::getNumericId, as well as an extensible replacement for
-
LegacyIdInterpreter::newIdFromTypeAndNumber.
- Since
- 3.9
- Copyright
- GPL-2.0-or-later
- Author
- Thiemo Kreuz
◆ __construct()
Wikibase\DataModel\Services\EntityId\EntityIdComposer::__construct |
( |
array |
$composers | ) |
|
- Parameters
-
callable[] | $composers | Array mapping entity type identifiers to callables accepting a single mixed value, representing the unique part of an entity ID serialization, and returning an EntityId object. |
- Exceptions
-
◆ composeEntityId()
Wikibase\DataModel\Services\EntityId\EntityIdComposer::composeEntityId |
( |
|
$repositoryName, |
|
|
|
$entityType, |
|
|
|
$uniquePart |
|
) |
| |
- Parameters
-
string | $repositoryName | |
string | $entityType | |
mixed | $uniquePart | |
- Exceptions
-
InvalidArgumentException | when the entity type is not known or the unique part is not unique. |
UnexpectedValueException | when the configured composer did not return an EntityId object. |
- Returns
- EntityId
◆ $composers
Wikibase\DataModel\Services\EntityId\EntityIdComposer::$composers |
|
private |
The documentation for this class was generated from the following file: