MultiBulk
extends MultiBulkIterator
in package
Streamable multibulk response.
Tags
Table of Contents
- $current : mixed
- $position : mixed
- $size : mixed
- $connection : mixed
- __construct() : mixed
- __destruct() : mixed
- Handles the synchronization of the client with the Redis protocol when the garbage collector kicks in (e.g. when the iterator goes out of the scope of a foreach or it is unset).
- count() : int
- Returns the number of items comprising the whole multibulk response.
- current() : mixed
- {@inheritdoc}
- drop() : mixed
- Drop queued elements that have not been read from the connection either by consuming the rest of the multibulk response or quickly by closing the underlying connection.
- getPosition() : int
- Returns the current position of the iterator.
- key() : mixed
- {@inheritdoc}
- next() : mixed
- {@inheritdoc}
- rewind() : mixed
- {@inheritdoc}
- valid() : mixed
- {@inheritdoc}
- getValue() : mixed
- Reads the next item of the multibulk response from the connection.
Properties
$current
protected
mixed
$current
$position
protected
mixed
$position
$size
protected
mixed
$size
$connection
private
mixed
$connection
Methods
__construct()
public
__construct(NodeConnectionInterface $connection, int $size) : mixed
Parameters
- $connection : NodeConnectionInterface
-
Connection to Redis.
- $size : int
-
Number of elements of the multibulk response.
Return values
mixed —__destruct()
Handles the synchronization of the client with the Redis protocol when the garbage collector kicks in (e.g. when the iterator goes out of the scope of a foreach or it is unset).
public
__destruct() : mixed
Return values
mixed —count()
Returns the number of items comprising the whole multibulk response.
public
count() : int
This method should be used instead of iterator_count() to get the size of the current multibulk response since the former consumes the iteration to count the number of elements, but our iterators do not support rewinding.
Return values
int —current()
{@inheritdoc}
public
current() : mixed
Return values
mixed —drop()
Drop queued elements that have not been read from the connection either by consuming the rest of the multibulk response or quickly by closing the underlying connection.
public
drop([bool $disconnect = false ]) : mixed
Parameters
- $disconnect : bool = false
-
Consume the iterator or drop the connection.
Return values
mixed —getPosition()
Returns the current position of the iterator.
public
getPosition() : int
Return values
int —key()
{@inheritdoc}
public
key() : mixed
Return values
mixed —next()
{@inheritdoc}
public
next() : mixed
Return values
mixed —rewind()
{@inheritdoc}
public
rewind() : mixed
Return values
mixed —valid()
{@inheritdoc}
public
valid() : mixed
Return values
mixed —getValue()
Reads the next item of the multibulk response from the connection.
protected
getValue() : mixed