|
Wikibase
MediaWiki Wikibase extension
|
Immutable value object for a statement id. More...
Collaboration diagram for Wikibase\DataModel\Statement\StatementGuid:Public Member Functions | |
| __construct (EntityId $entityId, string $guidPart, ?string $originalStatementId=null) | |
| getEntityId () | |
| getGuidPart () | |
| getSerialization () | |
If the $originalStatementId parameter is not used when constructing the StatementGuid object, then this method will return a statement id where the entity id prefix is normalized to upper case. | |
| equals ( $target) | |
| __toString () | |
Public Attributes | |
| const | SEPARATOR = '$' |
| The separator for the prefix and suffix of the GUID. | |
Private Attributes | |
| EntityId | $entityId |
| string | $guidPart |
| string | $serialization |
Immutable value object for a statement id.
A statement id consists of the entity id serialization of the entity it belongs to (e.g. "Q1") and a randomly generated global unique identifier (GUID), separated by a dollar sign.
| Wikibase\DataModel\Statement\StatementGuid::__construct | ( | EntityId | $entityId, |
| string | $guidPart, | ||
| ?string | $originalStatementId = null ) |
| EntityId | $entityId | the normalized entity id |
| string | $guidPart | the guid part of the statement id that appears after the separator |
| string | null | $originalStatementId | the original, non-normalized, statement id. Defaults to null for compatability. |
| Wikibase\DataModel\Statement\StatementGuid::__toString | ( | ) |
| Wikibase\DataModel\Statement\StatementGuid::equals | ( | $target | ) |
| mixed | $target |
| Wikibase\DataModel\Statement\StatementGuid::getEntityId | ( | ) |
| Wikibase\DataModel\Statement\StatementGuid::getGuidPart | ( | ) |
| Wikibase\DataModel\Statement\StatementGuid::getSerialization | ( | ) |
If the $originalStatementId parameter is not used when constructing the StatementGuid object, then this method will return a statement id where the entity id prefix is normalized to upper case.
This could cause issues when comparing to other statement id serializations, e.g. to look up a statement in a StatementList.
|
private |
|
private |
|
private |
| const Wikibase\DataModel\Statement\StatementGuid::SEPARATOR = '$' |
The separator for the prefix and suffix of the GUID.