__toString()
__toString() : string
Convert the stream to a string if the stream is readable and the stream is seekable.
Entity body used with an HTTP request or response
setRewindFunction(mixed $callable) : self
Specify a custom callback used to rewind a non-seekable stream. This can be useful entity enclosing requests that are redirected.
| mixed | $callable | Callable to invoke to rewind a non-seekable stream. The callback must accept an EntityBodyInterface object, perform the rewind if possible, and return a boolean representing whether or not the rewind was successful. |
compress(string $filter = 'zlib.deflate') : boolean
If the stream is readable, compress the data in the stream using deflate compression. The uncompressed stream is then closed, and the compressed stream then becomes the wrapped stream.
| string | $filter | Compression filter |
Returns TRUE on success or FALSE on failure
getContentMd5(boolean $rawOutput = false, boolean $base64Encode = false) : boolean|string
Get an MD5 checksum of the stream's contents
| boolean | $rawOutput | Whether or not to use raw output |
| boolean | $base64Encode | Whether or not to base64 encode raw output (only if raw output is true) |
Returns an MD5 string on success or FALSE on failure