Class Guzzle\Http\ReadLimitEntityBody

InheritanceGuzzle\Http\ReadLimitEntityBody » Guzzle\Http\AbstractEntityBodyDecorator
ImplementsGuzzle\Http\EntityBodyInterface

EntityBody decorator used to return only a subset of an entity body

Protected Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$body Guzzle\Http\EntityBodyInterface Decorated entity body Guzzle\Http\AbstractEntityBodyDecorator
$limit int Limit the number of bytes that can be read Guzzle\Http\ReadLimitEntityBody
$offset int Offset to start reading from Guzzle\Http\ReadLimitEntityBody

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__call() Allow decorators to implement custom methods Guzzle\Http\AbstractEntityBodyDecorator
__construct() Guzzle\Http\ReadLimitEntityBody
__toString() Returns only a subset of the decorated entity body when cast as a string {@inheritdoc} Guzzle\Http\ReadLimitEntityBody
close() Guzzle\Http\AbstractEntityBodyDecorator
compress() Guzzle\Http\AbstractEntityBodyDecorator
detachStream() Guzzle\Http\AbstractEntityBodyDecorator
feof() Alias of isConsumed() {@inheritdoc} Guzzle\Http\AbstractEntityBodyDecorator
ftell() Guzzle\Http\AbstractEntityBodyDecorator
getContentEncoding() Guzzle\Http\AbstractEntityBodyDecorator
getContentLength() Returns the Content-Length of the limited subset of data {@inheritdoc} Guzzle\Http\ReadLimitEntityBody
getContentMd5() Guzzle\Http\AbstractEntityBodyDecorator
getContentType() Guzzle\Http\AbstractEntityBodyDecorator
getCustomData() Guzzle\Http\AbstractEntityBodyDecorator
getMetaData() Guzzle\Http\AbstractEntityBodyDecorator
getSize() Guzzle\Http\AbstractEntityBodyDecorator
getStream() Guzzle\Http\AbstractEntityBodyDecorator
getStreamType() Guzzle\Http\AbstractEntityBodyDecorator
getUri() Guzzle\Http\AbstractEntityBodyDecorator
getWrapper() Guzzle\Http\AbstractEntityBodyDecorator
getWrapperData() Guzzle\Http\AbstractEntityBodyDecorator
isConsumed() Guzzle\Http\ReadLimitEntityBody
isLocal() Guzzle\Http\AbstractEntityBodyDecorator
isReadable() Guzzle\Http\AbstractEntityBodyDecorator
isRepeatable() Guzzle\Http\AbstractEntityBodyDecorator
isSeekable() Guzzle\Http\AbstractEntityBodyDecorator
isWritable() Guzzle\Http\AbstractEntityBodyDecorator
read() Guzzle\Http\ReadLimitEntityBody
readLine() Guzzle\Http\AbstractEntityBodyDecorator
rewind() Guzzle\Http\AbstractEntityBodyDecorator
seek() Allow for a bounded seek on the read limited entity body {@inheritdoc} Guzzle\Http\ReadLimitEntityBody
setCustomData() Guzzle\Http\AbstractEntityBodyDecorator
setLimit() Set the limit of bytes that the decorator allows to be read from the stream Guzzle\Http\ReadLimitEntityBody
setOffset() Set the offset to start limiting from Guzzle\Http\ReadLimitEntityBody
setRewindFunction() Guzzle\Http\AbstractEntityBodyDecorator
setSize() Guzzle\Http\AbstractEntityBodyDecorator
setStream() Guzzle\Http\AbstractEntityBodyDecorator
uncompress() Guzzle\Http\AbstractEntityBodyDecorator
write() Guzzle\Http\AbstractEntityBodyDecorator

Property Details

$limit protected property

Limit the number of bytes that can be read

protected int $limit null
$offset protected property

Offset to start reading from

protected int $offset null

Method Details

__construct() public method

public void __construct ( Guzzle\Http\EntityBodyInterface $body, $limit, $offset 0 )
$body Guzzle\Http\EntityBodyInterface

Body to wrap

$limit int

Total number of bytes to allow to be read from the stream

$offset int

Position to seek to before reading (only works on seekable streams)

__toString() public method

Returns only a subset of the decorated entity body when cast as a string {@inheritdoc}

public void __toString ( )
getContentLength() public method

Returns the Content-Length of the limited subset of data {@inheritdoc}

public void getContentLength ( )
isConsumed() public method

public void isConsumed ( )
read() public method

public void read ( $length )
$length
seek() public method

Allow for a bounded seek on the read limited entity body {@inheritdoc}

public void seek ( $offset, $whence SEEK_SET )
$offset
$whence
setLimit() public method

Set the limit of bytes that the decorator allows to be read from the stream

public self setLimit ( $limit )
$limit int

Total number of bytes to allow to be read from the stream

setOffset() public method

Set the offset to start limiting from

public self setOffset ( $offset )
$offset int

Offset to seek to and begin byte limiting from