Open Journal Systems  3.3.0
Guzzle\Http\IoEmittingEntityBody Class Reference
Inheritance diagram for Guzzle\Http\IoEmittingEntityBody:
Guzzle\Http\AbstractEntityBodyDecorator Guzzle\Common\HasDispatcherInterface Guzzle\Http\EntityBodyInterface Guzzle\Stream\StreamInterface

Public Member Functions

 addSubscriber (EventSubscriberInterface $subscriber)
 
 dispatch ($eventName, array $context=array())
 
 getEventDispatcher ()
 
 read ($length)
 
 setEventDispatcher (EventDispatcherInterface $eventDispatcher)
 
 write ($string)
 
- Public Member Functions inherited from Guzzle\Http\AbstractEntityBodyDecorator
 __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 ()
 
 readLine ($maxLength=null)
 
 rewind ()
 
 seek ($offset, $whence=SEEK_SET)
 
 setCustomData ($key, $value)
 
 setRewindFunction ($callable)
 
 setSize ($size)
 
 setStream ($stream, $size=0)
 
 uncompress ($filter='zlib.inflate')
 

Static Public Member Functions

static getAllEvents ()
 

Protected Attributes

 $eventDispatcher
 
- Protected Attributes inherited from Guzzle\Http\AbstractEntityBodyDecorator
 $body
 

Detailed Description

EntityBody decorator that emits events for read and write methods

Definition at line 14 of file IoEmittingEntityBody.php.

Member Function Documentation

◆ addSubscriber()

Guzzle\Http\IoEmittingEntityBody::addSubscriber ( EventSubscriberInterface  $subscriber)

{Add an event subscriber to the dispatcher

Parameters
EventSubscriberInterface$subscriberEvent subscriber
Returns
self
} @codeCoverageIgnore

Implements Guzzle\Common\HasDispatcherInterface.

Definition at line 56 of file IoEmittingEntityBody.php.

References Guzzle\Http\IoEmittingEntityBody\getEventDispatcher().

◆ dispatch()

Guzzle\Http\IoEmittingEntityBody::dispatch (   $eventName,
array  $context = array() 
)

Helper to dispatch Guzzle events and set the event name on the event

Parameters
string$eventNameName of the event to dispatch
array$contextContext of the event
Returns
Event Returns the created event object

Implements Guzzle\Common\HasDispatcherInterface.

Definition at line 47 of file IoEmittingEntityBody.php.

References Guzzle\Http\IoEmittingEntityBody\getEventDispatcher().

Referenced by Guzzle\Http\IoEmittingEntityBody\read(), and Guzzle\Http\IoEmittingEntityBody\write().

◆ getAllEvents()

static Guzzle\Http\IoEmittingEntityBody::getAllEvents ( )
static

Get a list of all of the events emitted from the class

Returns
array

Implements Guzzle\Common\HasDispatcherInterface.

Definition at line 22 of file IoEmittingEntityBody.php.

◆ getEventDispatcher()

Guzzle\Http\IoEmittingEntityBody::getEventDispatcher ( )

Get the EventDispatcher of the request

Returns
EventDispatcherInterface

Implements Guzzle\Common\HasDispatcherInterface.

Definition at line 38 of file IoEmittingEntityBody.php.

References Guzzle\Http\IoEmittingEntityBody\$eventDispatcher.

Referenced by Guzzle\Http\IoEmittingEntityBody\addSubscriber(), and Guzzle\Http\IoEmittingEntityBody\dispatch().

◆ read()

Guzzle\Http\IoEmittingEntityBody::read (   $length)

Read data from the stream

Parameters
int$lengthUp to length number of bytes read.
Returns
string|bool Returns the data read from the stream or FALSE on failure or EOF

Reimplemented from Guzzle\Http\AbstractEntityBodyDecorator.

Definition at line 63 of file IoEmittingEntityBody.php.

References Guzzle\Http\IoEmittingEntityBody\dispatch().

◆ setEventDispatcher()

Guzzle\Http\IoEmittingEntityBody::setEventDispatcher ( EventDispatcherInterface  $eventDispatcher)

{Set the EventDispatcher of the request

Parameters
EventDispatcherInterface$eventDispatcher
Returns
self
} @codeCoverageIgnore

Implements Guzzle\Common\HasDispatcherInterface.

Definition at line 31 of file IoEmittingEntityBody.php.

References Guzzle\Http\IoEmittingEntityBody\$eventDispatcher.

◆ write()

Guzzle\Http\IoEmittingEntityBody::write (   $string)

Write data to the stream

Parameters
string$stringThe string that is to be written.
Returns
int|bool Returns the number of bytes written to the stream on success or FALSE on failure.

Reimplemented from Guzzle\Http\AbstractEntityBodyDecorator.

Definition at line 75 of file IoEmittingEntityBody.php.

References Guzzle\Http\IoEmittingEntityBody\dispatch().

Field Documentation

◆ $eventDispatcher

EventDispatcherInterface Guzzle\Http\IoEmittingEntityBody::$eventDispatcher
protected

The documentation for this class was generated from the following file: