Predis\Protocol\Text\ProtocolProcessor::useIterableMultibulk PHP Method

useIterableMultibulk() public method

Streamable multibulk responses are not globally supported by the abstractions built-in into Predis, such as transactions or pipelines. Use them with care!
public useIterableMultibulk ( boolean $value )
$value boolean Enable or disable streamable multibulk responses.
    public function useIterableMultibulk($value)
    {
        $this->mbiterable = (bool) $value;
    }

Usage Example

 /**
  * @group disconnected
  */
 public function testIterableMultibulkSupport()
 {
     $protocol = new ProtocolProcessor();
     $protocol->useIterableMultibulk(true);
     $connection = $this->getMock('Predis\\Connection\\CompositeConnectionInterface');
     $connection->expects($this->once(4))->method('readLine')->will($this->returnValue('*1'));
     $this->assertInstanceOf('Predis\\Response\\Iterator\\MultiBulk', $protocol->read($connection));
 }
All Usage Examples Of Predis\Protocol\Text\ProtocolProcessor::useIterableMultibulk