$body
$body : \Guzzle\Http\EntityBodyInterface
EntityBody decorator that emits events for read and write methods
$body : \Guzzle\Http\EntityBodyInterface
$eventDispatcher : \Symfony\Component\EventDispatcher\EventDispatcherInterface
__construct(\Guzzle\Http\EntityBodyInterface $body)
\Guzzle\Http\EntityBodyInterface | $body | Entity body to decorate |
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
setEventDispatcher(\Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher) : self
Set the EventDispatcher of the request
\Symfony\Component\EventDispatcher\EventDispatcherInterface | $eventDispatcher |
getEventDispatcher() : \Symfony\Component\EventDispatcher\EventDispatcherInterface
Get the EventDispatcher of the request
dispatch(string $eventName, array $context = array()) : \Guzzle\Common\Event
Helper to dispatch Guzzle events and set the event name on the event
string | $eventName | Name of the event to dispatch |
array | $context | Context of the event |
Returns the created event object
addSubscriber(\Symfony\Component\EventDispatcher\EventSubscriberInterface $subscriber) : self
Add an event subscriber to the dispatcher
\Symfony\Component\EventDispatcher\EventSubscriberInterface | $subscriber | Event subscriber |