1 | <?php |
||
19 | class StatementGuid implements Comparable { |
||
20 | |||
21 | /** |
||
22 | * The separator for the prefix and suffix of the GUID. |
||
23 | */ |
||
24 | public const SEPARATOR = '$'; |
||
25 | |||
26 | /** |
||
27 | * @var EntityId |
||
28 | */ |
||
29 | private $entityId; |
||
30 | |||
31 | 11 | /** |
|
32 | 11 | * @var string |
|
33 | 5 | */ |
|
34 | private $guidPart; |
||
35 | 6 | ||
36 | /** |
||
37 | * @var string |
||
38 | */ |
||
39 | 6 | private $serialization; |
|
40 | 6 | ||
41 | 6 | /** |
|
42 | * @param EntityId $entityId |
||
43 | * @param string $guid |
||
44 | * |
||
45 | * @throws InvalidArgumentException |
||
46 | 3 | */ |
|
47 | 3 | public function __construct( EntityId $entityId, $guid ) { |
|
56 | |||
57 | /** |
||
58 | * @return EntityId |
||
59 | */ |
||
60 | public function getEntityId() { |
||
63 | 6 | ||
64 | /** |
||
65 | * @since 9.4 |
||
66 | * |
||
67 | * @return string |
||
68 | 6 | */ |
|
69 | public function getGuidPart() { |
||
72 | |||
73 | /** |
||
74 | * @return string |
||
75 | * @deprecated The value returned by this method might differ in case from the original, unparsed statement GUID |
||
76 | * (the entity ID part might have been lowercase originally, but is always normalized in the return value here), |
||
77 | * which means that the value should not be compared to other statement GUID serializations, |
||
78 | * e.g. to look up a statement in a StatementList. |
||
79 | */ |
||
80 | public function getSerialization() { |
||
83 | |||
84 | /** |
||
85 | * @param mixed $target |
||
86 | * |
||
87 | * @return bool |
||
88 | */ |
||
89 | public function equals( $target ) { |
||
97 | |||
98 | public function __toString() { |
||
101 | |||
102 | } |
||
103 |