Open Journal Systems
3.3.0
|
Public Member Functions | |
__call ($method, array $args) | |
__construct (EntityBodyInterface $body) | |
__toString () | |
close () | |
compress ($filter='zlib.deflate') | |
detachStream () | |
feof () | |
ftell () | |
getContentEncoding () | |
getContentLength () | |
getContentMd5 ($rawOutput=false, $base64Encode=false) | |
getContentType () | |
getCustomData ($key) | |
getMetaData ($key=null) | |
getSize () | |
getStream () | |
getStreamType () | |
getUri () | |
getWrapper () | |
getWrapperData () | |
isConsumed () | |
isLocal () | |
isReadable () | |
isRepeatable () | |
isSeekable () | |
isWritable () | |
read ($length) | |
readLine ($maxLength=null) | |
rewind () | |
seek ($offset, $whence=SEEK_SET) | |
setCustomData ($key, $value) | |
setRewindFunction ($callable) | |
setSize ($size) | |
setStream ($stream, $size=0) | |
uncompress ($filter='zlib.inflate') | |
write ($string) | |
Protected Attributes | |
$body | |
Abstract decorator used to wrap entity bodies
Definition at line 10 of file AbstractEntityBodyDecorator.php.
Guzzle\Http\AbstractEntityBodyDecorator::__construct | ( | EntityBodyInterface | $body | ) |
EntityBodyInterface | $body | Entity body to decorate |
Reimplemented in Guzzle\Http\CachingEntityBody.
Definition at line 21 of file AbstractEntityBodyDecorator.php.
References Guzzle\Http\AbstractEntityBodyDecorator\$body.
Guzzle\Http\AbstractEntityBodyDecorator::__call | ( | $method, | |
array | $args | ||
) |
Allow decorators to implement custom methods
string | $method | Missing method name |
array | $args | Method arguments |
Definition at line 39 of file AbstractEntityBodyDecorator.php.
Guzzle\Http\AbstractEntityBodyDecorator::__toString | ( | ) |
Convert the stream to a string if the stream is readable and the stream is seekable.
Implements Guzzle\Stream\StreamInterface.
Reimplemented in Guzzle\Http\CachingEntityBody, and Guzzle\Http\ReadLimitEntityBody.
Definition at line 26 of file AbstractEntityBodyDecorator.php.
References Guzzle\Http\AbstractEntityBodyDecorator\$body.
Guzzle\Http\AbstractEntityBodyDecorator::close | ( | ) |
Close the underlying stream
Implements Guzzle\Stream\StreamInterface.
Reimplemented in Guzzle\Http\CachingEntityBody.
Definition at line 44 of file AbstractEntityBodyDecorator.php.
Guzzle\Http\AbstractEntityBodyDecorator::compress | ( | $filter = 'zlib.deflate' | ) |
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 |
Implements Guzzle\Http\EntityBodyInterface.
Definition at line 61 of file AbstractEntityBodyDecorator.php.
Guzzle\Http\AbstractEntityBodyDecorator::detachStream | ( | ) |
Detach the current stream resource
Implements Guzzle\Stream\StreamInterface.
Definition at line 110 of file AbstractEntityBodyDecorator.php.
Guzzle\Http\AbstractEntityBodyDecorator::feof | ( | ) |
Alias of isConsumed() {Alias of isConsumed
Implements Guzzle\Stream\StreamInterface.
Definition at line 166 of file AbstractEntityBodyDecorator.php.
References Guzzle\Http\AbstractEntityBodyDecorator\isConsumed().
Referenced by Guzzle\Http\ReadLimitEntityBody\__toString().
Guzzle\Http\AbstractEntityBodyDecorator::ftell | ( | ) |
Returns the current position of the file read/write pointer
Implements Guzzle\Stream\StreamInterface.
Definition at line 208 of file AbstractEntityBodyDecorator.php.
Referenced by Guzzle\Http\CachingEntityBody\__toString(), Guzzle\Http\CachingEntityBody\seek(), and Guzzle\Http\CachingEntityBody\write().
Guzzle\Http\AbstractEntityBodyDecorator::getContentEncoding | ( | ) |
Get the Content-Encoding of the EntityBody
Implements Guzzle\Http\EntityBodyInterface.
Reimplemented in Guzzle\Http\CachingEntityBody.
Definition at line 88 of file AbstractEntityBodyDecorator.php.
Guzzle\Http\AbstractEntityBodyDecorator::getContentLength | ( | ) |
Get the Content-Length of the entity body if possible (alias of getSize)
Implements Guzzle\Http\EntityBodyInterface.
Reimplemented in Guzzle\Http\ReadLimitEntityBody.
Definition at line 71 of file AbstractEntityBodyDecorator.php.
References Guzzle\Http\AbstractEntityBodyDecorator\getSize().
Guzzle\Http\AbstractEntityBodyDecorator::getContentMd5 | ( | $rawOutput = false , |
|
$base64Encode = false |
|||
) |
Get an MD5 checksum of the stream's contents
bool | $rawOutput | Whether or not to use raw output |
bool | $base64Encode | Whether or not to base64 encode raw output (only if raw output is true) |
Implements Guzzle\Http\EntityBodyInterface.
Definition at line 81 of file AbstractEntityBodyDecorator.php.
References Guzzle\Stream\Stream\getHash().
Guzzle\Http\AbstractEntityBodyDecorator::getContentType | ( | ) |
Guess the Content-Type of a local stream
Implements Guzzle\Http\EntityBodyInterface.
Reimplemented in Guzzle\Http\CachingEntityBody.
Definition at line 76 of file AbstractEntityBodyDecorator.php.
Guzzle\Http\AbstractEntityBodyDecorator::getCustomData | ( | $key | ) |
Get custom data from the stream
string | $key | Key to retrieve |
Implements Guzzle\Stream\StreamInterface.
Reimplemented in Guzzle\Http\CachingEntityBody.
Definition at line 213 of file AbstractEntityBodyDecorator.php.
Guzzle\Http\AbstractEntityBodyDecorator::getMetaData | ( | $key = null | ) |
Get stream metadata
string | $key | Specific metadata to retrieve |
Implements Guzzle\Stream\StreamInterface.
Reimplemented in Guzzle\Http\CachingEntityBody.
Definition at line 93 of file AbstractEntityBodyDecorator.php.
Guzzle\Http\AbstractEntityBodyDecorator::getSize | ( | ) |
Get the size of the stream if able
Implements Guzzle\Stream\StreamInterface.
Reimplemented in Guzzle\Http\CachingEntityBody.
Definition at line 137 of file AbstractEntityBodyDecorator.php.
Referenced by Guzzle\Http\AbstractEntityBodyDecorator\getContentLength().
Guzzle\Http\AbstractEntityBodyDecorator::getStream | ( | ) |
Get the stream resource
Implements Guzzle\Stream\StreamInterface.
Reimplemented in Guzzle\Http\CachingEntityBody.
Definition at line 98 of file AbstractEntityBodyDecorator.php.
Guzzle\Http\AbstractEntityBodyDecorator::getStreamType | ( | ) |
Get a label describing the underlying implementation of the stream
Implements Guzzle\Stream\StreamInterface.
Reimplemented in Guzzle\Http\CachingEntityBody.
Definition at line 127 of file AbstractEntityBodyDecorator.php.
Guzzle\Http\AbstractEntityBodyDecorator::getUri | ( | ) |
Get the URI/filename associated with this stream
Implements Guzzle\Stream\StreamInterface.
Reimplemented in Guzzle\Http\CachingEntityBody.
Definition at line 132 of file AbstractEntityBodyDecorator.php.
Guzzle\Http\AbstractEntityBodyDecorator::getWrapper | ( | ) |
Get the stream wrapper type
Implements Guzzle\Stream\StreamInterface.
Reimplemented in Guzzle\Http\CachingEntityBody.
Definition at line 117 of file AbstractEntityBodyDecorator.php.
Guzzle\Http\AbstractEntityBodyDecorator::getWrapperData | ( | ) |
Wrapper specific data attached to this stream.
Implements Guzzle\Stream\StreamInterface.
Reimplemented in Guzzle\Http\CachingEntityBody.
Definition at line 122 of file AbstractEntityBodyDecorator.php.
Guzzle\Http\AbstractEntityBodyDecorator::isConsumed | ( | ) |
Check if the stream has been consumed
Implements Guzzle\Stream\StreamInterface.
Reimplemented in Guzzle\Http\CachingEntityBody, and Guzzle\Http\ReadLimitEntityBody.
Definition at line 157 of file AbstractEntityBodyDecorator.php.
Referenced by Guzzle\Http\AbstractEntityBodyDecorator\feof().
Guzzle\Http\AbstractEntityBodyDecorator::isLocal | ( | ) |
Check if the stream is a local stream vs a remote stream
Implements Guzzle\Stream\StreamInterface.
Definition at line 171 of file AbstractEntityBodyDecorator.php.
Guzzle\Http\AbstractEntityBodyDecorator::isReadable | ( | ) |
Check if the stream is readable
Implements Guzzle\Stream\StreamInterface.
Definition at line 142 of file AbstractEntityBodyDecorator.php.
Referenced by Guzzle\Http\AbstractEntityBodyDecorator\isRepeatable().
Guzzle\Http\AbstractEntityBodyDecorator::isRepeatable | ( | ) |
Check if the stream is repeatable
Implements Guzzle\Stream\StreamInterface.
Definition at line 147 of file AbstractEntityBodyDecorator.php.
References Guzzle\Http\AbstractEntityBodyDecorator\isReadable(), and Guzzle\Http\AbstractEntityBodyDecorator\isSeekable().
Guzzle\Http\AbstractEntityBodyDecorator::isSeekable | ( | ) |
Check if the string is repeatable
Implements Guzzle\Stream\StreamInterface.
Definition at line 176 of file AbstractEntityBodyDecorator.php.
Referenced by Guzzle\Http\AbstractEntityBodyDecorator\isRepeatable().
Guzzle\Http\AbstractEntityBodyDecorator::isWritable | ( | ) |
Check if the stream is writable
Implements Guzzle\Stream\StreamInterface.
Definition at line 152 of file AbstractEntityBodyDecorator.php.
Guzzle\Http\AbstractEntityBodyDecorator::read | ( | $length | ) |
Read data from the stream
int | $length | Up to length number of bytes read. |
Implements Guzzle\Stream\StreamInterface.
Reimplemented in Guzzle\Http\ReadLimitEntityBody, Guzzle\Http\CachingEntityBody, and Guzzle\Http\IoEmittingEntityBody.
Definition at line 193 of file AbstractEntityBodyDecorator.php.
Guzzle\Http\AbstractEntityBodyDecorator::readLine | ( | $maxLength = null | ) |
Read a line from the stream up to the maximum allowed buffer length
int | $maxLength | Maximum buffer length |
Implements Guzzle\Stream\StreamInterface.
Reimplemented in Guzzle\Http\CachingEntityBody.
Definition at line 203 of file AbstractEntityBodyDecorator.php.
Guzzle\Http\AbstractEntityBodyDecorator::rewind | ( | ) |
Rewind to the beginning of the stream
Implements Guzzle\Stream\StreamInterface.
Reimplemented in Guzzle\Http\CachingEntityBody.
Definition at line 56 of file AbstractEntityBodyDecorator.php.
Guzzle\Http\AbstractEntityBodyDecorator::seek | ( | $offset, | |
$whence = SEEK_SET |
|||
) |
Seek to a position in the stream
int | $offset | Stream offset |
int | $whence | Where the offset is applied |
Implements Guzzle\Stream\StreamInterface.
Reimplemented in Guzzle\Http\ReadLimitEntityBody, and Guzzle\Http\CachingEntityBody.
Definition at line 188 of file AbstractEntityBodyDecorator.php.
Guzzle\Http\AbstractEntityBodyDecorator::setCustomData | ( | $key, | |
$value | |||
) |
Set custom data on the stream
string | $key | Key to set |
mixed | $value | Value to set |
Implements Guzzle\Stream\StreamInterface.
Reimplemented in Guzzle\Http\CachingEntityBody.
Definition at line 218 of file AbstractEntityBodyDecorator.php.
Guzzle\Http\AbstractEntityBodyDecorator::setRewindFunction | ( | $callable | ) |
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. |
Implements Guzzle\Http\EntityBodyInterface.
Reimplemented in Guzzle\Http\CachingEntityBody.
Definition at line 49 of file AbstractEntityBodyDecorator.php.
Guzzle\Http\AbstractEntityBodyDecorator::setSize | ( | $size | ) |
Specify the size of the stream in bytes
int | $size | Size of the stream contents in bytes |
Implements Guzzle\Stream\StreamInterface.
Definition at line 181 of file AbstractEntityBodyDecorator.php.
Guzzle\Http\AbstractEntityBodyDecorator::setStream | ( | $stream, | |
$size = 0 |
|||
) |
Set the stream that is wrapped by the object
resource | $stream | Stream resource to wrap |
int | $size | Size of the stream in bytes. Only pass if the size cannot be obtained from the stream. |
Implements Guzzle\Stream\StreamInterface.
Reimplemented in Guzzle\Http\CachingEntityBody.
Definition at line 103 of file AbstractEntityBodyDecorator.php.
Guzzle\Http\AbstractEntityBodyDecorator::uncompress | ( | $filter = 'zlib.inflate' | ) |
Decompress a deflated string. Once uncompressed, the uncompressed string is then used as the wrapped stream.
string | $filter | De-compression filter |
Implements Guzzle\Http\EntityBodyInterface.
Definition at line 66 of file AbstractEntityBodyDecorator.php.
Guzzle\Http\AbstractEntityBodyDecorator::write | ( | $string | ) |
Write data to the stream
string | $string | The string that is to be written. |
Implements Guzzle\Stream\StreamInterface.
Reimplemented in Guzzle\Http\CachingEntityBody, and Guzzle\Http\IoEmittingEntityBody.
Definition at line 198 of file AbstractEntityBodyDecorator.php.
|
protected |
Decorated entity body
Definition at line 16 of file AbstractEntityBodyDecorator.php.
Referenced by Guzzle\Http\AbstractEntityBodyDecorator\__construct(), Guzzle\Http\CachingEntityBody\__construct(), Guzzle\Http\ReadLimitEntityBody\__construct(), and Guzzle\Http\AbstractEntityBodyDecorator\__toString().