Properties

Methods

__toString()

__toString() 

__call()

__call(string  $method, array  $args) : mixed

Allow decorators to implement custom methods

Parameters

string $method

Missing method name

array $args

Method arguments

Returns

mixed

close()

close() 

setRewindFunction()

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.

Parameters

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.

Returns

self

rewind()

rewind() 

compress()

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.

Parameters

string $filter

Compression filter

Returns

boolean —

Returns TRUE on success or FALSE on failure

uncompress()

uncompress(string  $filter = 'zlib.inflate') : boolean

Decompress a deflated string. Once uncompressed, the uncompressed string is then used as the wrapped stream.

Parameters

string $filter

De-compression filter

Returns

boolean —

Returns TRUE on success or FALSE on failure

getContentLength()

getContentLength() : integer|boolean

Get the Content-Length of the entity body if possible (alias of getSize)

Returns

integer|boolean —

Returns the Content-Length or false on failure

getContentType()

getContentType() : string|null

Guess the Content-Type of a local stream

Returns

string|null

getContentMd5()

getContentMd5(boolean  $rawOutput = false, boolean  $base64Encode = false) : boolean|string

Get an MD5 checksum of the stream's contents

Parameters

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

boolean|string —

Returns an MD5 string on success or FALSE on failure

getContentEncoding()

getContentEncoding() : boolean|string

Get the Content-Encoding of the EntityBody

Returns

boolean|string

getMetaData()

getMetaData(  $key = null) 

Parameters

$key

getStream()

getStream() 

setStream()

setStream(  $stream,   $size) 

Parameters

$stream
$size

detachStream()

detachStream() 

getWrapper()

getWrapper() 

getWrapperData()

getWrapperData() 

getStreamType()

getStreamType() 

getUri()

getUri() 

getSize()

getSize() 

isReadable()

isReadable() 

isRepeatable()

isRepeatable() 

isWritable()

isWritable() 

isConsumed()

isConsumed() 

feof()

feof() 

Alias of isConsumed() {@inheritdoc}

isLocal()

isLocal() 

isSeekable()

isSeekable() 

setSize()

setSize(  $size) 

Parameters

$size

seek()

seek(  $offset,   $whence = SEEK_SET) 

Parameters

$offset
$whence

read()

read(  $length) 

Parameters

$length

write()

write(  $string) 

Parameters

$string

readLine()

readLine(  $maxLength = null) 

Parameters

$maxLength

ftell()

ftell() 

getCustomData()

getCustomData(  $key) 

Parameters

$key

setCustomData()

setCustomData(  $key,   $value) 

Parameters

$key
$value

getAllEvents()

getAllEvents() : array

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

Returns

array

dispatch()

dispatch(string  $eventName, array  $context = array()) : \Guzzle\Common\Event

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

Parameters

string $eventName

Name of the event to dispatch

array $context

Context of the event

Returns

\Guzzle\Common\Event

Returns the created event object