Predis\Client::isConnected PHP 메소드

isConnected() 공개 메소드

Returns the current state of the underlying connection.
public isConnected ( ) : boolean
리턴 boolean
    public function isConnected()
    {
        return $this->connection->isConnected();
    }

Usage Example

예제 #1
0
 /**
  * Creates a connect to Redis or Sentinel using the Predis\Client object.  It proxies the connecting and converts
  * specific client exceptions to more generic adapted ones in PSRedis
  *
  * @throws \PSRedis\Exception\ConnectionError
  */
 public function connect()
 {
     try {
         $this->predisClient = $this->predisClientFactory->createClient($this->clientType, $this->getPredisClientParameters());
         $this->predisClient->connect();
         $this->isConnected = $this->predisClient->isConnected();
     } catch (ConnectionException $e) {
         throw new ConnectionError($e->getMessage());
     }
 }
All Usage Examples Of Predis\Client::isConnected