Predis\ClientInterface::getConnection PHP Метод

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

Returns the underlying connection instance.
public getConnection ( ) : Predis\Connection\ConnectionInterface
Результат Predis\Connection\ConnectionInterface
    public function getConnection();

Usage Example

Пример #1
0
 /**
  * Checks if the passed client instance satisfies the required conditions
  * needed to initialize the transaction object.
  *
  * @param ClientInterface $client Client instance used by the transaction object.
  *
  * @throws NotSupportedException
  */
 private function assertClient(ClientInterface $client)
 {
     if ($client->getConnection() instanceof AggregateConnectionInterface) {
         throw new NotSupportedException('Cannot initialize a MULTI/EXEC transaction over aggregate connections.');
     }
     if (!$client->getProfile()->supportsCommands(array('MULTI', 'EXEC', 'DISCARD'))) {
         throw new NotSupportedException('The current profile does not support MULTI, EXEC and DISCARD.');
     }
 }
All Usage Examples Of Predis\ClientInterface::getConnection