public function connect()
    {
        if ($this->object) {
            return true;
        }

        $this->object = new \Redis;
        $connect = $this->persistent ? 'pconnect' : 'connect';
        $result = $this->object->$connect($this->host, $this->port, $this->timeout);

        if ($result && $this->auth) {
            $result = $this->object->auth($this->auth);
        }

        if ($result) {
            foreach ($this->options as $key => $value) {
                $this->object->setOption($key, $value);
            }
        }

        return $result;
    }
public function connect()
    {
        if ($this->object) {
            return true;
        }

        $this->object = new \Redis;
        $connect = $this->persistent ? 'pconnect' : 'connect';
        $result = $this->object->$connect($this->host, $this->port, $this->timeout);

        if ($result && $this->auth) {
            $result = $this->object->auth($this->auth);
        }

        if ($result) {
            foreach ($this->options as $key => $value) {
                $this->object->setOption($key, $value);
            }
        }

        return $result;
    }
public function connect ( ) { if ( $ this -> object ) { return true ; } $ this -> object = new \ Redis ; $ connect = $ this -> persistent ? 'pconnect' : 'connect' ; $ result = $ this -> object -> $ connect ( $ this -> host , $ this -> port , $ this -> timeout ) ; if ( $ result && $ this -> auth ) { $ result = $ this -> object -> auth ( $ this -> auth ) ; } if ( $ result ) { foreach ( $ this -> options as $ key => $ value ) { $ this -> object -> setOption ( $ key , $ value ) ; } } return $ result ; }
Connect the redis server and set redis options

@return bool true on success, false on error
Connect the redis server and set redis options