protected function init()
    {
        $method = $this->options['persistent'] ? 'pconnect' : 'connect';

        try {
            if (strpos($this->options['host'], '/') === 0) {
                $this->redis->{$method}($this->options['host']);
            } else {
                $this->redis->{$method}($this->options['host'], $this->options['port']);
            }

            if ($this->options['auth']) {
                $this->redis->auth($this->options['auth']);
            }
        } catch (\Exception $e) {
            throw new PhealException('Connecting to cache failed!', null, $e);
        }
    }
protected function init()
    {
        $method = $this->options['persistent'] ? 'pconnect' : 'connect';

        try {
            if (strpos($this->options['host'], '/') === 0) {
                $this->redis->{$method}($this->options['host']);
            } else {
                $this->redis->{$method}($this->options['host'], $this->options['port']);
            }

            if ($this->options['auth']) {
                $this->redis->auth($this->options['auth']);
            }
        } catch (\Exception $e) {
            throw new PhealException('Connecting to cache failed!', null, $e);
        }
    }
protected function init ( ) { $ method = $ this -> options [ 'persistent' ] ? 'pconnect' : 'connect' ; try { if ( strpos ( $ this -> options [ 'host' ] , '/' ) === 0 ) { $ this -> redis -> { $ method } ( $ this -> options [ 'host' ] ) ; } else { $ this -> redis -> { $ method } ( $ this -> options [ 'host' ] , $ this -> options [ 'port' ] ) ; } if ( $ this -> options [ 'auth' ] ) { $ this -> redis -> auth ( $ this -> options [ 'auth' ] ) ; } } catch ( \ Exception $ e ) { throw new PhealException ( 'Connecting to cache failed!' , null , $ e ) ; } }
Initialize redis connection

@throws \Pheal\Exceptions\PhealException
@return void
Initialize redis connection