execute() публичный Метод

Handles the actual execution of the whole pipeline.
public execute ( mixed $callable = null ) : array
$callable mixed Optional callback for execution.
Результат array
Пример #1
0
 /**
  * @group disconnected
  */
 public function testExecuteWithCallableArgumentHandlesExceptions()
 {
     $exception = null;
     $connection = $this->getMock('Predis\\Connection\\NodeConnectionInterface');
     $connection->expects($this->never())->method('writeRequest');
     $connection->expects($this->never())->method('readResponse');
     $pipeline = new Pipeline(new Client($connection));
     $exception = null;
     $responses = null;
     try {
         $responses = $pipeline->execute(function ($pipe) {
             $pipe->echo('one');
             $pipe->echo('two');
             throw new ClientException('TEST');
         });
     } catch (\Exception $exception) {
         // NOOP
     }
     $this->assertInstanceOf('Predis\\ClientException', $exception);
     $this->assertSame('TEST', $exception->getMessage());
     $this->assertNull($responses);
 }