1 | <?php |
||
19 | abstract class SnakObject implements Snak { |
||
20 | |||
21 | /** |
||
22 | * @since 0.1 |
||
23 | * |
||
24 | * @var PropertyId |
||
25 | */ |
||
26 | protected $propertyId; |
||
27 | |||
28 | /** |
||
29 | * Support for passing in an EntityId instance that is not a PropertyId instance has |
||
30 | * been deprecated since 0.5. |
||
31 | * |
||
32 | * @since 0.1 |
||
33 | * |
||
34 | * @param PropertyId|EntityId|int $propertyId |
||
35 | * |
||
36 | * @throws InvalidArgumentException |
||
37 | */ |
||
38 | public function __construct( $propertyId ) { |
||
57 | 3 | ||
58 | /** |
||
59 | * @see PropertyIdProvider::getPropertyId |
||
60 | 28 | * |
|
61 | * @since 0.1 |
||
62 | * |
||
63 | * @return PropertyId |
||
64 | 28 | */ |
|
65 | 28 | public function getPropertyId() { |
|
68 | |||
69 | /** |
||
70 | * @return string |
||
71 | */ |
||
72 | public function getHash() { |
||
75 | 3 | ||
76 | /** |
||
77 | * |
||
78 | * @since 0.3 |
||
79 | * |
||
80 | * @param mixed $target |
||
81 | * |
||
82 | * @return bool |
||
83 | 16 | */ |
|
84 | 16 | public function equals( $target ) { |
|
93 | |||
94 | /** |
||
95 | * @see Serializable::serialize |
||
96 | 12 | * |
|
97 | 12 | * @since 7.0 serialization format changed in an incompatible way |
|
98 | * |
||
99 | * @return string |
||
100 | */ |
||
101 | 12 | public function serialize() { |
|
104 | |||
105 | /** |
||
106 | * @see Serializable::unserialize |
||
107 | * |
||
108 | * @since 0.1 |
||
109 | * |
||
110 | * @param string $serialized |
||
111 | */ |
||
112 | public function unserialize( $serialized ) { |
||
120 | |||
121 | } |
||
122 |