Bluz\Cache\Adapter\Redis::getHandler PHP Метод

getHandler() публичный Метод

Get Redis handler
public getHandler ( ) : Redis
Результат Redis
    public function getHandler()
    {
        if (!$this->handler) {
            $this->handler = new \Redis();
            if ($this->settings['connection_persistent']) {
                $this->handler->pconnect($this->settings['host'], $this->settings['port'], $this->settings['timeout']);
            } else {
                $this->handler->connect($this->settings['host'], $this->settings['port'], $this->settings['timeout']);
            }
            if (isset($this->settings['options'])) {
                foreach ($this->settings['options'] as $key => $value) {
                    $this->handler->setOption($key, $value);
                }
            }
        }
        return $this->handler;
    }