FluentDOM\Iterators\IndexIterator::seek PHP Méthode

seek() public méthode

Move iterator pointer to specified element
public seek ( integer $position )
$position integer
    public function seek($position)
    {
        if ($this->getOwner()->count() > $position) {
            $this->_position = $position;
        } else {
            throw new \InvalidArgumentException(sprintf('Unknown position %d, only %d items', $position, $this->getOwner()->count()));
        }
    }