Class IoEmittingEntityBody
EntityBody decorator that emits events for read and write methods
- Guzzle\Http\AbstractEntityBodyDecorator implements Guzzle\Http\EntityBodyInterface
-
Guzzle\Http\IoEmittingEntityBody
implements
Guzzle\Common\HasDispatcherInterface
Methods summary
-
public staticgetAllEvents ( )Get a list of all of the events emitted from the class
-
publicsetEventDispatcher ( Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher )Set the EventDispatcher of the request
-
publicgetEventDispatcher ( )Get the EventDispatcher of the request
-
publicdispatch ( string $eventName, array $context = array() )Helper to dispatch Guzzle events and set the event name on the event
-
publicaddSubscriber ( Symfony\Component\EventDispatcher\EventSubscriberInterface $subscriber )Add an event subscriber to the dispatcher
-
publicread ( int $length )Read data from the stream
-
publicwrite ( string $string )Write data to the stream
Methods detail
Get a list of all of the events emitted from the class
Returns
arrayImplementation of
public
Guzzle\Http\IoEmittingEntityBody
setEventDispatcher( Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher )
Set the EventDispatcher of the request
Parameters
- $eventDispatcher
Symfony\Component\EventDispatcher\EventDispatcherInterface
$eventDispatcher
Returns
CodeCoverageIgnore
Implementation of
Get the EventDispatcher of the request
Returns
Symfony\Component\EventDispatcher\EventDispatcherInterfaceImplementation of
Helper to dispatch Guzzle events and set the event name on the event
Parameters
- $eventName
string
$eventName Name of the event to dispatch- $context
array
$context Context of the event
Returns
Implementation of
public
Guzzle\Http\IoEmittingEntityBody
addSubscriber( Symfony\Component\EventDispatcher\EventSubscriberInterface $subscriber )
Add an event subscriber to the dispatcher
Parameters
- $subscriber
Symfony\Component\EventDispatcher\EventSubscriberInterface
$subscriber Event subscriber
Returns
CodeCoverageIgnore
Implementation of
Read data from the stream
Parameters
- $length
integer
$length Up to length number of bytes read.
Returns
string|booleanReturns the data read from the stream or FALSE on failure or EOF
Overrides
Write data to the stream
Parameters
- $string
string
$string The string that is to be written.
Returns
integer|booleanReturns the number of bytes written to the stream on success or FALSE on failure.
Overrides
Methods inherited from Guzzle\Http\AbstractEntityBodyDecorator
__call(),
__construct(),
__toString(),
close(),
compress(),
detachStream(),
feof(),
ftell(),
getContentEncoding(),
getContentLength(),
getContentMd5(),
getContentType(),
getCustomData(),
getMetaData(),
getSize(),
getStream(),
getStreamType(),
getUri(),
getWrapper(),
getWrapperData(),
isConsumed(),
isLocal(),
isReadable(),
isRepeatable(),
isSeekable(),
isWritable(),
readLine(),
rewind(),
seek(),
setCustomData(),
setRewindFunction(),
setSize(),
setStream(),
uncompress()
Magic methods summary
Properties summary
protected
Symfony\Component\EventDispatcher\EventDispatcherInterface
|
$eventDispatcher |