Wikibase
MediaWiki Wikibase extension
|
Constructs EntityId objects from entity type identifiers and unique parts of entity ID serializations. More...
Public Member Functions | |
__construct (array $composers) | |
composeEntityId ( $entityType, $uniquePart) | |
Private Attributes | |
$composers | |
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
Wikibase\DataModel\Services\EntityId\EntityIdComposer::__construct | ( | array | $composers | ) |
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. |
InvalidArgumentException |
Wikibase\DataModel\Services\EntityId\EntityIdComposer::composeEntityId | ( | $entityType, | |
$uniquePart ) |
string | $entityType | |
mixed | $uniquePart |
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. |
|
private |