src/M6Web/Component/Redis/Manager.php
protected function init($params)
    {
        // check serverConfig
        if (!isset($params['server_config'])) {
            throw new Exception("parameter serverConfig is mandatory");
        }

        ksort($params['server_config']);
        $this->setServerConfig($params['server_config']);
        if (isset($params['timeout'])) {
            $this->timeout = $params['timeout'];
        }
        if (isset($params['read_write_timeout'])) {
            $this->read_write_timeout = $params['read_write_timeout'];
        } else {
            // use the same timeout
            $this->read_write_timeout = $this->timeout;
        }
        if (isset($params['compress']) and is_bool($params['compress'])) {
            $this->compress = $params['compress'];
        }

        if (isset($params['reconnect']) and is_int($params['reconnect'])) {
            $this->reconnect = $params['reconnect'];
        }

        if (isset($params['event_name'])) {
            $this->eventName = (string) $params['event_name'];
        }

        return $this;
    }
protected function init($params)
    {
        // check serverConfig
        if (!isset($params['server_config'])) {
            throw new Exception("parameter serverConfig is mandatory");
        }

        ksort($params['server_config']);
        $this->setServerConfig($params['server_config']);
        if (isset($params['timeout'])) {
            $this->timeout = $params['timeout'];
        }
        if (isset($params['read_write_timeout'])) {
            $this->read_write_timeout = $params['read_write_timeout'];
        } else {
            // use the same timeout
            $this->read_write_timeout = $this->timeout;
        }
        if (isset($params['compress']) and is_bool($params['compress'])) {
            $this->compress = $params['compress'];
        }

        if (isset($params['reconnect']) and is_int($params['reconnect'])) {
            $this->reconnect = $params['reconnect'];
        }

        if (isset($params['event_name'])) {
            $this->eventName = (string) $params['event_name'];
        }

        return $this;
    }
init for the class
@param array $params confg array

@throws Exception
@return \M6Web\Component\Redis\Manager
@throw Exception