connect() public method

Opens the underlying connection to the server.
public connect ( )
コード例 #1
0
ファイル: PredisEngine.php プロジェクト: renan/cakephp-predis
 /**
  * Initialize the cache engine
  *
  * Called automatically by the cache frontend. Merge the runtime config with the defaults
  * before use.
  *
  * @param array $config Associative array of parameters for the engine
  * @return bool True if the engine has been successfully initialized, false if not
  */
 public function init(array $config = [])
 {
     parent::init($config);
     $this->client = new Client($this->_config['connections'], $this->_config['options']);
     $this->client->connect();
     return $this->client->isConnected();
 }