connect() public method

Opens the underlying connection to the server.
public connect ( )
Exemplo n.º 1
0
 /**
  * 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();
 }