4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\PropertyAccess
;
15 * Traverses a property path and provides additional methods to find out
16 * information about the current element
18 * @author Bernhard Schussek <bschussek@gmail.com>
20 class PropertyPathIterator
extends \ArrayIterator
implements PropertyPathIteratorInterface
23 * The traversed property path
24 * @var PropertyPathInterface
31 * @param PropertyPathInterface $path The property path to traverse
33 public function __construct(PropertyPathInterface
$path)
35 parent
::__construct($path->getElements());
43 public function isIndex()
45 return $this->path
->isIndex($this->key());
51 public function isProperty()
53 return $this->path
->isProperty($this->key());