1 | <?php |
||
19 | class EntityIdValue extends DataValueObject { |
||
20 | |||
21 | 19 | private $entityId; |
|
22 | 19 | ||
23 | 19 | public function __construct( EntityId $entityId ) { |
|
26 | |||
27 | /** |
||
28 | * @see Serializable::serialize |
||
29 | * |
||
30 | * @since 7.0 serialization format changed in an incompatible way |
||
31 | * |
||
32 | 8 | * @note Do not use PHP serialization for persistence! Use a DataValueSerializer instead. |
|
33 | 8 | * |
|
34 | 8 | * |
|
35 | 8 | * @return string |
|
36 | 8 | */ |
|
37 | public function serialize() { |
||
40 | |||
41 | /** |
||
42 | * @see Serializable::unserialize |
||
43 | * |
||
44 | * @since 0.5 |
||
45 | * |
||
46 | * @param string $serialized |
||
47 | 16 | * |
|
48 | 16 | * @throws IllegalValueException |
|
49 | */ |
||
50 | public function unserialize( $serialized ) { |
||
68 | |||
69 | 8 | /** |
|
70 | 8 | * @see DataValue::getType |
|
71 | * |
||
72 | * @since 0.5 |
||
73 | * |
||
74 | * @return string |
||
75 | */ |
||
76 | public static function getType() { |
||
79 | 7 | ||
80 | 7 | /** |
|
81 | * @see DataValue::getSortKey |
||
82 | * |
||
83 | * @since 0.5 |
||
84 | * |
||
85 | * @return string|float|int |
||
86 | */ |
||
87 | public function getSortKey() { |
||
90 | 7 | ||
91 | 7 | /** |
|
92 | * @see DataValue::getValue |
||
93 | * |
||
94 | * @since 0.5 |
||
95 | * |
||
96 | * @return self |
||
97 | */ |
||
98 | public function getValue() { |
||
102 | 7 | ||
103 | /** |
||
104 | * @since 0.5 |
||
105 | * |
||
106 | * @return EntityId |
||
107 | */ |
||
108 | public function getEntityId() { |
||
111 | 1 | ||
112 | /** |
||
113 | * @see DataValue::getArrayValue |
||
114 | * |
||
115 | * @since 0.5 |
||
116 | * |
||
117 | * @return array |
||
118 | */ |
||
119 | public function getArrayValue() { |
||
131 | |||
132 | /** |
||
133 | * Constructs a new instance of the DataValue from the provided data. |
||
134 | * This can round-trip with |
||
135 | * @see getArrayValue |
||
136 | * |
||
137 | * @since 0.5 |
||
138 | * |
||
139 | * @param mixed $data |
||
140 | 17 | * |
|
141 | 17 | * @deprecated since 7.1, use callbacks in DataValueDeserializer instead |
|
142 | 2 | * |
|
143 | * @throws IllegalValueException |
||
144 | * @return self |
||
145 | 15 | */ |
|
146 | 2 | public static function newFromArray( $data ) { |
|
161 | |||
162 | 8 | /** |
|
163 | * @param string $entityType |
||
164 | * @param int|float|string $numericId |
||
165 | * |
||
166 | * @throws IllegalValueException |
||
167 | * @return self |
||
168 | */ |
||
169 | private static function newIdFromTypeAndNumber( $entityType, $numericId ) { |
||
176 | |||
177 | } |
||
178 |