1 | <?php |
||
29 | class WosObjectMetadata implements \IteratorAggregate, WosObjectMetadataInterface |
||
30 | { |
||
31 | use ArrayToMetadataStringTrait; |
||
32 | |||
33 | /** |
||
34 | * Unknown value |
||
35 | */ |
||
36 | const UNKNOWN = null; |
||
37 | |||
38 | /** |
||
39 | * @var array |
||
40 | */ |
||
41 | private $metadata; |
||
42 | |||
43 | /** |
||
44 | * @var int |
||
45 | */ |
||
46 | private $objectSize; |
||
47 | |||
48 | /** |
||
49 | * WosObjectMetadata constructor. |
||
50 | * |
||
51 | * @param ResponseInterface $httpResponse |
||
52 | */ |
||
53 | public function __construct(ResponseInterface $httpResponse) |
||
60 | |||
61 | /** |
||
62 | * Return representation of the metadata as it would appear as a x-ddn-metadata value |
||
63 | * |
||
64 | * @return mixed |
||
65 | */ |
||
66 | public function __toString() |
||
70 | |||
71 | /** |
||
72 | * @param string $key |
||
73 | * @return mixed |
||
74 | */ |
||
75 | public function get($key) |
||
79 | |||
80 | /** |
||
81 | * @param string $key |
||
82 | * @return bool |
||
83 | */ |
||
84 | public function has($key) |
||
88 | |||
89 | /** |
||
90 | * @return array|mixed[] |
||
91 | */ |
||
92 | public function toArray() |
||
96 | |||
97 | /** |
||
98 | * Returns data length in BYTES if known, NULL otherwise |
||
99 | * |
||
100 | * @return int|null |
||
101 | */ |
||
102 | public function getObjectSize() |
||
106 | |||
107 | /** |
||
108 | * Whether a offset exists |
||
109 | * |
||
110 | * @link http://php.net/manual/en/arrayaccess.offsetexists.php |
||
111 | * @param mixed $offset <p> |
||
112 | * An offset to check for. |
||
113 | * </p> |
||
114 | * @return boolean true on success or false on failure. |
||
115 | * </p> |
||
116 | * <p> |
||
117 | * The return value will be casted to boolean if non-boolean was returned. |
||
118 | * @since 5.0.0 |
||
119 | */ |
||
120 | public function offsetExists($offset) |
||
124 | |||
125 | /** |
||
126 | * Offset to retrieve |
||
127 | * |
||
128 | * @link http://php.net/manual/en/arrayaccess.offsetget.php |
||
129 | * @param mixed $offset <p> |
||
130 | * The offset to retrieve. |
||
131 | * </p> |
||
132 | * @return mixed Can return all value types. |
||
133 | * @since 5.0.0 |
||
134 | */ |
||
135 | public function offsetGet($offset) |
||
139 | |||
140 | /** |
||
141 | * Offset to set |
||
142 | * |
||
143 | * @link http://php.net/manual/en/arrayaccess.offsetset.php |
||
144 | * @param mixed $offset <p> |
||
145 | * The offset to assign the value to. |
||
146 | * </p> |
||
147 | * @param mixed $value <p> |
||
148 | * The value to set. |
||
149 | * </p> |
||
150 | * @return void |
||
151 | * @since 5.0.0 |
||
152 | */ |
||
153 | public function offsetSet($offset, $value) |
||
157 | |||
158 | /** |
||
159 | * Offset to unset |
||
160 | * |
||
161 | * @link http://php.net/manual/en/arrayaccess.offsetunset.php |
||
162 | * @param mixed $offset <p> |
||
163 | * The offset to unset. |
||
164 | * </p> |
||
165 | * @return void |
||
166 | * @since 5.0.0 |
||
167 | */ |
||
168 | public function offsetUnset($offset) |
||
172 | |||
173 | /** |
||
174 | * Retrieve an external iterator |
||
175 | * |
||
176 | * @link http://php.net/manual/en/iteratoraggregate.getiterator.php |
||
177 | * @return Traversable An instance of an object implementing <b>Iterator</b> or |
||
178 | * <b>Traversable</b> |
||
179 | * @since 5.0.0 |
||
180 | */ |
||
181 | public function getIterator() |
||
185 | |||
186 | /** |
||
187 | * Count elements of an object |
||
188 | * |
||
189 | * @link http://php.net/manual/en/countable.count.php |
||
190 | * @return int The custom count as an integer. |
||
191 | * </p> |
||
192 | * <p> |
||
193 | * The return value is cast to an integer. |
||
194 | * @since 5.1.0 |
||
195 | */ |
||
196 | public function count() |
||
200 | } |
||
201 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..