You are here

public function NoSeekStream::seek in Lockr 7.3

Seek to a position in the stream.

@link http://www.php.net/manual/en/function.fseek.php

Parameters

int $offset Stream offset:

int $whence Specifies how the cursor position will be calculated: based on the seek offset. Valid values are identical to the built-in PHP $whence values for `fseek()`. SEEK_SET: Set position equal to offset bytes SEEK_CUR: Set position to current location plus offset SEEK_END: Set position to end-of-stream plus offset.

Throws

\RuntimeException on failure.

Overrides StreamDecoratorTrait::seek

File

vendor/guzzlehttp/psr7/src/NoSeekStream.php, line 13

Class

NoSeekStream
Stream decorator that prevents a stream from being seeked

Namespace

GuzzleHttp\Psr7

Code

public function seek($offset, $whence = SEEK_SET) {
  throw new \RuntimeException('Cannot seek a NoSeekStream');
}