__toString() __toString() : string Convert the stream to a string if the stream is readable and the stream is seekable. Returns string
getMetaData() getMetaData(string $key = null) : array|mixed|null Get stream metadata Parameters string $key Specific metadata to retrieve Returns array|mixed|null
setStream() setStream(resource $stream, integer $size = null) : self Set the stream that is wrapped by the object Parameters resource $stream Stream resource to wrap integer $size Size of the stream in bytes. Only pass if the size cannot be obtained from the stream. Returns self
getWrapperData() getWrapperData() : array Wrapper specific data attached to this stream. Returns array
getStreamType() getStreamType() : string Get a label describing the underlying implementation of the stream Returns string
isLocal() isLocal() : boolean Check if the stream is a local stream vs a remote stream Returns boolean
setSize() setSize(integer $size) : self Specify the size of the stream in bytes Parameters integer $size Size of the stream contents in bytes Returns self
seek() seek(integer $offset, integer $whence = SEEK_SET) : boolean Seek to a position in the stream Parameters integer $offset Stream offset integer $whence Where the offset is applied Returns boolean — Returns TRUE on success or FALSE on failure
read() read(integer $length) : string|boolean Read data from the stream Parameters integer $length Up to length number of bytes read. Returns string|boolean — Returns the data read from the stream or FALSE on failure or EOF
write() write(string $string) : integer|boolean Write data to the stream Parameters string $string The string that is to be written. Returns integer|boolean — Returns the number of bytes written to the stream on success or FALSE on failure.
ftell() ftell() : integer|boolean Returns the current position of the file read/write pointer Returns integer|boolean — Returns the position of the file pointer or false on error
rewind() rewind() : boolean Rewind to the beginning of the stream Returns boolean — Returns true on success or false on failure
readLine() readLine(integer $maxLength = null) : string|boolean Read a line from the stream up to the maximum allowed buffer length Parameters integer $maxLength Maximum buffer length Returns string|boolean
setCustomData() setCustomData(string $key, mixed $value) : self Set custom data on the stream Parameters string $key Key to set mixed $value Value to set Returns self
getCustomData() getCustomData(string $key) : null|mixed Get custom data from the stream Parameters string $key Key to retrieve Returns null|mixed