public function seek($position)
    {
        if (!array_key_exists($position, $this->elements)) {
            throw new \InvalidArgumentException(
                sprintf('Position %s does not exist in collection', $position)
            );
        }

        reset($this->elements);

        while (key($this->elements) !== $position) {
            next($this->elements);
        }
    }
public function seek($position)
    {
        if (!array_key_exists($position, $this->elements)) {
            throw new \InvalidArgumentException(
                sprintf('Position %s does not exist in collection', $position)
            );
        }

        reset($this->elements);

        while (key($this->elements) !== $position) {
            next($this->elements);
        }
    }
public function seek ( $ position ) { if ( ! array_key_exists ( $ position , $ this -> elements ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Position %s does not exist in collection' , $ position ) ) ; } reset ( $ this -> elements ) ; while ( key ( $ this -> elements ) !== $ position ) { next ( $ this -> elements ) ; } }
Seek to a position within the collection

@param $position
@return void
Seek to a position within the collection