\GuzzleHttp\Psr7NoSeekStream

Stream decorator that prevents a stream from being seeked.

Summary

Methods
Properties
Constants
__construct()
__get()
__toString()
getContents()
__call()
close()
getMetadata()
detach()
getSize()
eof()
tell()
isReadable()
isWritable()
isSeekable()
rewind()
seek()
read()
write()
No public properties found
No constants found
createStream()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

__construct()

__construct(\Psr\Http\Message\StreamInterface  $stream) : mixed

Parameters

\Psr\Http\Message\StreamInterface $stream

Stream to decorate

Returns

mixed —

__get()

__get(string  $name) : \Psr\Http\Message\StreamInterface

Magic method used to create a new stream if streams are not added in the constructor of a decorator (e.g., LazyOpenStream).

Parameters

string $name

Name of the property (allows "stream" only).

Returns

\Psr\Http\Message\StreamInterface —

__toString()

__toString() : mixed

Returns

mixed —

getContents()

getContents() : mixed

Returns

mixed —

__call()

__call(string  $method, array  $args) : mixed

Allow decorators to implement custom methods

Parameters

string $method

Missing method name

array $args

Method arguments

Returns

mixed —

close()

close() : mixed

Returns

mixed —

getMetadata()

getMetadata(mixed  $key = null) : mixed

Parameters

mixed $key

Returns

mixed —

detach()

detach() : mixed

Returns

mixed —

getSize()

getSize() : mixed

Returns

mixed —

eof()

eof() : mixed

Returns

mixed —

tell()

tell() : mixed

Returns

mixed —

isReadable()

isReadable() : mixed

Returns

mixed —

isWritable()

isWritable() : mixed

Returns

mixed —

isSeekable()

isSeekable() : bool

Returns whether or not the stream is seekable.

Returns

bool —

rewind()

rewind() : mixed

Returns

mixed —

seek()

seek(mixed  $offset, mixed  $whence = SEEK_SET) : mixed

Seek to a position in the stream.

Parameters

mixed $offset

Stream offset

mixed $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.

Returns

mixed —

read()

read(mixed  $length) : mixed

Parameters

mixed $length

Returns

mixed —

write()

write(mixed  $string) : mixed

Parameters

mixed $string

Returns

mixed —

createStream()

createStream() : \Psr\Http\Message\StreamInterface

Implement in subclasses to dynamically create streams when requested.

Throws

\BadMethodCallException

Returns

\Psr\Http\Message\StreamInterface —