Methods summary
public
|
#
__construct( Guzzle\Http\EntityBodyInterface $body )
We will treat the buffer object as the body of the entity body
We will treat the buffer object as the body of the entity body
Parameters
- $body
- Entity body to decorate
Overrides
|
public
string
|
#
__toString( )
Will give the contents of the buffer followed by the exhausted remote stream.
Will give the contents of the buffer followed by the exhausted remote stream.
Warning: Loads the entire stream into memory
Returns
string
Overrides
|
public
integer|boolean
|
#
getSize( )
Get the size of the stream if able
Get the size of the stream if able
Returns
integer|boolean
Overrides
|
public
boolean
|
#
seek( integer $offset, integer $whence = SEEK_SET )
Seek to a position in the stream
Seek to a position in the stream
Parameters
- $offset
- Stream offset
- $whence
- Where the offset is applied
Returns
boolean Returns TRUE on success or FALSE on failure
Throws
RuntimeException When seeking with SEEK_END or when seeking past the total size of the buffer stream
Overrides
|
public
boolean
|
#
rewind( )
Rewind to the beginning of the stream
Rewind to the beginning of the stream
Returns
boolean Returns true on success or false on failure
Overrides
|
public
Guzzle\Http\CachingEntityBody
|
#
setRewindFunction( mixed $callable )
Does not support custom rewind functions
Does not support custom rewind functions
Parameters
- $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
Throws
Overrides
|
public
string|boolean
|
#
read( integer $length )
Read data from the stream
Read data from the stream
Parameters
- $length
- Up to length number of bytes read.
Returns
string|boolean Returns the data read from the stream or FALSE on failure or EOF
Overrides
|
public
integer|boolean
|
#
write( string $string )
Write data to the stream
Parameters
- $string
- The string that is to be written.
Returns
integer|boolean Returns the number of bytes written to the stream on success or FALSE on failure.
Overrides
|
public
string|boolean
|
#
readLine( integer $maxLength = null )
Read a line from the stream up to the maximum allowed buffer length
Read a line from the stream up to the maximum allowed buffer length
Parameters
- $maxLength
- Maximum buffer length
Returns
string|boolean
Link
Overrides
|
public
boolean
|
#
isConsumed( )
Check if the stream has been consumed
Check if the stream has been consumed
Returns
boolean
Overrides
|
public
|
#
close( )
Close both the remote stream and buffer stream
Close both the remote stream and buffer stream
Overrides
|
public
Guzzle\Http\CachingEntityBody
|
#
setStream( resource $stream, integer $size = 0 )
Set the stream that is wrapped by the object
Set the stream that is wrapped by the object
Parameters
- $stream
- Stream resource to wrap
- $size
- Size of the stream in bytes. Only pass if the size cannot be obtained from the stream.
Returns
Overrides
|
public
string|null
|
#
getContentType( )
Guess the Content-Type of a local stream
Guess the Content-Type of a local stream
Returns
string|null
See
http://www.php.net/manual/en/function.finfo-open.php
Overrides
|
public
boolean|string
|
#
getContentEncoding( )
Get the Content-Encoding of the EntityBody
Get the Content-Encoding of the EntityBody
Returns
boolean|string
Overrides
|
public
array|mixed|null
|
#
getMetaData( string $key = null )
Get stream metadata
Parameters
- $key
- Specific metadata to retrieve
Returns
array|mixed|null
Overrides
|
public
resource
|
#
getStream( )
Get the stream resource
Returns
resource
Overrides
|
public
string
|
#
getWrapper( )
Get the stream wrapper type
Get the stream wrapper type
Returns
string
Overrides
|
public
array
|
#
getWrapperData( )
Wrapper specific data attached to this stream.
Wrapper specific data attached to this stream.
Returns
array
Overrides
|
public
string
|
#
getStreamType( )
Get a label describing the underlying implementation of the stream
Get a label describing the underlying implementation of the stream
Returns
string
Overrides
|
public
string
|
#
getUri( )
Get the URI/filename associated with this stream
Get the URI/filename associated with this stream
Returns
string
Overrides
|
public
null|mixed
|
#
getCustomData( string $key )
Always retrieve custom data from the remote stream
Get custom data from the stream
Always retrieve custom data from the remote stream
Get custom data from the stream
Parameters
Returns
null|mixed
Overrides
|
public
Guzzle\Http\CachingEntityBody
|
#
setCustomData( string $key, mixed $value )
Always set custom data on the remote stream
Set custom data on the stream
Always set custom data on the remote stream
Set custom data on the stream
Parameters
- $key
- Key to set
- $value
- Value to set
Returns
Overrides
|