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