public function seek($iOffset)
    {
        $this->rewind();
        $iPosition = 0;

        while ($iPosition < $iOffset and true === $this->valid()) {
            $this->next();
            $iPosition++;
        }

        if (false === $this->valid()) {
            throw new \OutOfBoundsException('Invalid seek position: ' . $iOffset);
        }

        return $this->current();
    }
public function seek($iOffset)
    {
        $this->rewind();
        $iPosition = 0;

        while ($iPosition < $iOffset and true === $this->valid()) {
            $this->next();
            $iPosition++;
        }

        if (false === $this->valid()) {
            throw new \OutOfBoundsException('Invalid seek position: ' . $iOffset);
        }

        return $this->current();
    }
public function seek ( $ iOffset ) { $ this -> rewind ( ) ; $ iPosition = 0 ; while ( $ iPosition < $ iOffset and true === $ this -> valid ( ) ) { $ this -> next ( ) ; $ iPosition ++ ; } if ( false === $ this -> valid ( ) ) { throw new \ OutOfBoundsException ( 'Invalid seek position: ' . $ iOffset ) ; } return $ this -> current ( ) ; }
seek the pointer to the offset position

@param int $iOffset Seek position

@return mixed
@throws \OutOfBoundsException
seek the pointer to the offset position