| 1 |
<?php |
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
namespace Symfony\Component\PropertyAccess; |
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
class PropertyPathIterator extends \ArrayIterator implements PropertyPathIteratorInterface |
| 23 |
{ |
| 24 |
public function __construct( |
| 25 |
protected PropertyPathInterface $path, |
| 26 |
) { |
| 27 |
parent::__construct($path->getElements()); |
| 28 |
} |
| 29 |
|
| 30 |
public function isIndex(): bool |
| 31 |
{ |
| 32 |
return $this->path->isIndex($this->key()); |
| 33 |
} |
| 34 |
|
| 35 |
public function isProperty(): bool |
| 36 |
{ |
| 37 |
return $this->path->isProperty($this->key()); |
| 38 |
} |
| 39 |
} |