src/UthandoCommon/Model/AbstractCollection.php
public function seek($index)
    {
        $this->rewind();
        $position = 0;

        while ($position < $index && $this->valid()) {
            $this->next();
            $position++;
        }

        if (!$this->valid()) {
            throw new CollectionException('Invalid seek position');
        }
    }
public function seek($index)
    {
        $this->rewind();
        $position = 0;

        while ($position < $index && $this->valid()) {
            $this->next();
            $position++;
        }

        if (!$this->valid()) {
            throw new CollectionException('Invalid seek position');
        }
    }
public function seek ( $ index ) { $ this -> rewind ( ) ; $ position = 0 ; while ( $ position < $ index && $ this -> valid ( ) ) { $ this -> next ( ) ; $ position ++ ; } if ( ! $ this -> valid ( ) ) { throw new CollectionException ( 'Invalid seek position' ) ; } }
Seek to the given index.

@param int $index
@throws CollectionException
Seek to the given index .