Predis\Connection\Aggregate\RedisCluster::disconnect PHP Метод

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

public disconnect ( )
    public function disconnect()
    {
        foreach ($this->pool as $connection) {
            $connection->disconnect();
        }
    }

Usage Example

 /**
  * @group disconnected
  */
 public function testDisconnectForcesAllConnectionsToDisconnect()
 {
     $connection1 = $this->getMockConnection('tcp://127.0.0.1:6379');
     $connection1->expects($this->once())->method('disconnect');
     $connection2 = $this->getMockConnection('tcp://127.0.0.1:6380');
     $connection2->expects($this->once())->method('disconnect');
     $cluster = new RedisCluster(new Connection\Factory());
     $cluster->add($connection1);
     $cluster->add($connection2);
     $cluster->disconnect();
 }