Rev 12 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 12 | Rev 26 | ||
---|---|---|---|
Line 111... | Line 111... | ||
111 | } |
111 | } |
112 | 112 | ||
113 | return $out; |
113 | return $out; |
114 | } |
114 | } |
115 | 115 | ||
116 | class SimpleXMLElement implements ArrayAccess, Iterator { |
116 | class SimpleXMLElement implements ArrayAccess, Iterator { /** @phpstan-ignore-line */ |
117 | 117 | ||
118 | function __destruct() { |
118 | function __destruct() { |
119 | global $_simplexml_supplement_properties; |
119 | global $_simplexml_supplement_properties; |
120 | unset($_simplexml_supplement_properties[spl_object_hash($this)]); |
120 | unset($_simplexml_supplement_properties[spl_object_hash($this)]); |
121 | } |
121 | } |
Line 182... | Line 182... | ||
182 | if (isset($data[_simplexml_supplement_addnumberprefix(0)])) { |
182 | if (isset($data[_simplexml_supplement_addnumberprefix(0)])) { |
183 | return $data[_simplexml_supplement_addnumberprefix(0)]; |
183 | return $data[_simplexml_supplement_addnumberprefix(0)]; |
184 | } else { |
184 | } else { |
185 | return ''; |
185 | return ''; |
186 | } |
186 | } |
187 | } else { |
187 | } else { /** @phpstan-ignore-line */ |
188 | return $data; |
188 | return $data; |
189 | } |
189 | } |
190 | } |
190 | } |
191 | 191 | ||
192 | public function offsetExists($offset) { |
192 | public function offsetExists($offset) { |
Line 256... | Line 256... | ||
256 | 256 | ||
257 | public function current() { |
257 | public function current() { |
258 | global $_simplexml_supplement_properties; |
258 | global $_simplexml_supplement_properties; |
259 | $vars = get_object_vars($this); |
259 | $vars = get_object_vars($this); |
260 | $cnt = 0; |
260 | $cnt = 0; |
261 | foreach ($vars as $x => $dummy) { |
261 | foreach ($vars as $x => $dummy) { /** @phpstan-ignore-line */ |
262 | if (($dummy instanceof SimpleXMLElement) && !_simplexml_supplement_isnumeric($x) && $dummy->isArray()) { |
262 | if (($dummy instanceof SimpleXMLElement) && !_simplexml_supplement_isnumeric($x) && $dummy->isArray()) { |
263 | $vars2 = get_object_vars($dummy); |
263 | $vars2 = get_object_vars($dummy); |
264 | foreach ($vars2 as $x2 => $dummy2) { |
264 | foreach ($vars2 as $x2 => $dummy2) { |
265 | if ($cnt == $_simplexml_supplement_properties[spl_object_hash($this)]['position']) { |
265 | if ($cnt == $_simplexml_supplement_properties[spl_object_hash($this)]['position']) { |
266 | if ($dummy2 instanceof SimpleXMLElement) { |
266 | if ($dummy2 instanceof SimpleXMLElement) { |
267 | return $dummy2; |
267 | return $dummy2; /** @phpstan-ignore-line */ |
268 | } else { |
268 | } else { |
269 | return new SimpleXMLElement($dummy2); |
269 | return new SimpleXMLElement($dummy2); /** @phpstan-ignore-line */ |
270 | } |
270 | } |
271 | } |
271 | } |
272 | $cnt++; |
272 | $cnt++; |
273 | } |
273 | } |
274 | } else { |
274 | } else { |
275 | if ($cnt == $_simplexml_supplement_properties[spl_object_hash($this)]['position']) { |
275 | if ($cnt == $_simplexml_supplement_properties[spl_object_hash($this)]['position']) { |
276 | if ($dummy instanceof SimpleXMLElement) { |
276 | if ($dummy instanceof SimpleXMLElement) { |
277 | return $dummy; |
277 | return $dummy; /** @phpstan-ignore-line */ |
278 | } else { |
278 | } else { |
279 | return new SimpleXMLElement($dummy); |
279 | return new SimpleXMLElement($dummy); /** @phpstan-ignore-line */ |
280 | } |
280 | } |
281 | } |
281 | } |
282 | $cnt++; |
282 | $cnt++; |
283 | } |
283 | } |
284 | } |
284 | } |
Line 288... | Line 288... | ||
288 | 288 | ||
289 | public function key() { |
289 | public function key() { |
290 | global $_simplexml_supplement_properties; |
290 | global $_simplexml_supplement_properties; |
291 | $vars = get_object_vars($this); |
291 | $vars = get_object_vars($this); |
292 | $cnt = 0; |
292 | $cnt = 0; |
293 | foreach ($vars as $x => $dummy) { |
293 | foreach ($vars as $x => $dummy) { /** @phpstan-ignore-line */ |
294 | if (($dummy instanceof SimpleXMLElement) && !_simplexml_supplement_isnumeric($x) && $dummy->isArray()) { |
294 | if (($dummy instanceof SimpleXMLElement) && !_simplexml_supplement_isnumeric($x) && $dummy->isArray()) { |
295 | $vars2 = get_object_vars($dummy); |
295 | $vars2 = get_object_vars($dummy); |
296 | foreach ($vars2 as $x2 => $dummy2) { |
296 | foreach ($vars2 as $x2 => $dummy2) { |
297 | if ($cnt == $_simplexml_supplement_properties[spl_object_hash($this)]['position']) return $x/*sic*/; |
297 | if ($cnt == $_simplexml_supplement_properties[spl_object_hash($this)]['position']) return $x/*sic*/; |
298 | $cnt++; |
298 | $cnt++; |