(PHP 5 >= 5.1.0)
Seeks to a position
@link http://php.net/manual/en/seekableiterator.seek.php
@param int|string $position The position to seek to.
@return void
163045
public function seek($position)
    {
        reset($this->_storage);
        while (($key = key($this->_storage)) !== null && $key !== $position)
        {
            next($this->_storage);
        }
    }
380871
public function setAncor ( $position = null ) {
        if ( is_null($position) === true ) {
            $position = $this->_currentPosition;
        }
        $this->_ancorPosition = $position;
        return $this;
    }
346737
public function setLocation(string $location)
    {
        $dir = Directory::make($location, Directory::MAKE_DIRECTORY_EXISTS_OPEN);

        $old = $this->getPath();
        $new = $dir->getPath();

        if(rename($old, $new)) {
            $this->_location = $dir->getPath();
        }
    }
1213990
public function setLocation(string $location)
    {
        if (empty($location)) {
            Throw new HeaderException('Empty location is now allowed.');
        }

        $this->location = $location;
    }
942814
public function getByPosition($position)
    {
        return isset($this->_entities[$position]) ? $this->_entities[$position] : null;
    }
1158626
public function setItemPosition($position)
    {
        if ((int)$position >= 0) {
            // check if given position is larger as possible position
            if ($position >= ($countItems = $this->countItems())) {
                // set position to max possible position
                $position = $countItems - 1;
            }

            if ($position <= ($this->countItems() / 2)) {
                reset($this->_items);
                $this->_itemValid = true;
                $this->_itemPosition = 0;

                // go with next
                while ($position != $this->_itemPosition) {
                    if (!next($this->_items)) {
                        $this->_itemValid = false;
                        throw new IteratorException('Specified position is not valid (next).', E_NOTICE);
                        break;
                    } else {
                        $this->_itemValid = true;
                        $this->_itemPosition++;
                    }
                }
            } else {
                if (!end($this->_items)) {
                    $this->_itemValid = false;
                    $this->_itemPosition = 0;
                } else {
                    if (($countItems = $this->countItems()) > 0) {
                        $this->_itemValid = true;
                        $this->_itemPosition = $countItems - 1;
                    } else {
                        $this->_itemValid = false;
                        $this->_itemPosition = 0;
                    }
                }

                // go with prev
                while ($position != $this->_itemPosition) {
                    if (!prev($this->_items)) {
                        $this->_itemValid = false;
                        throw new IteratorException('Specified position is not valid (previous).', E_NOTICE);
                        break;
                    } else {
                        $this->_itemValid = true;
                        $this->_itemPosition--;
                    }
                }
            }
        } else {
            throw new IteratorException('Specified position is not valid.', E_WARNING);
        }
    }
344906
public synchronized void seek(long position) throws IOException {
    if (position < 0 || position >= count) {
      throw new IOException("cannot seek position " + position + " as it is out of bounds");
    }
    pos = (int) position;
  }
212172
public function setLocation($location)
    {
        if (! is_int($location)) {
            throw new \InvalidArgumentException(
                'Argument 1 must be an int value. Valued passed is of type ' . gettype($location));
        }
        
        $this->location = $location;
    }
1000163
public function nth($position)
    {
        if ($position < 0) {
            $position = $this->count() + $position;
        }
        if ($position < 0 || $this->count() < $position) {
            throw new \InvalidArgumentException('Invalid Position');
        }

        $slice = array_slice($this->items, $position, 1);
        return empty($slice) ? null : reset($slice);
    }
298664
public function seek($position)
    {
        $position = (int) $position;
        if ($position < 0 || $position >= $this->_count) {
            throw new Kwf_Exception("Illegal index $position");
        }
        $this->_pointer = $position;
        return $this;
    }
1340040
private function doSeek($pos)
    {
        if ($this->limit !== -1) {
            $pos = min([$pos, $this->limit]);
        }
        $this->position = max([0, $pos]);
    }
651847
public function seek($position) {
		$index       = $this->getIndexData();
		$maxPosition = count($index) - 1;
		
		if ($position > $maxPosition) {
			$position = $maxPosition;
		}
		
		fseek($this->file, $index[$position]);
		$this->pointer = $position;
	}
774688
public function setStart($position)
    {
        if (! is_int($position)) {
            throw new \InvalidArgumentException(
                'Argument 1 must be of type integer. Argument type is ' . gettype($position));
        }

        $this->start = $position;
    }
1290307
protected function incrementPositionsOfItemsAbove($position = null)
    {
        if ($this->isNotInList()) return;

        if (null === $position) {
            $position = $this->getListifyPosition();
        }

        $this->listifyScopedQuery()
            ->where($this->positionColumn(), '<', $position)
            ->increment($this->positionColumn());
    }
546540
public function getAt($position)
    {
        if($position < $this->count() && $position < 0) {
            return null;
        }
        
        $this->first();
        
        while($position > 1) {
            $this->next();
            --$position;
        }
        
        return $this->current();
    }
153482
public function setPosition($position)
	{
		if ( $position == $this->getPosition() ) { return; }

		$this->_values['pos'] = (int) $position;
		$this->setModified();
	}
45627
public function setEnd($position)
    {
        if (! is_int($position)) {
            throw new \InvalidArgumentException(
                'Argument 1 must be of type integer. Argument type is ' . gettype($position));
        }

        $this->end = $position;
    }