public function openManager()
    {
        if ($this->manager !== null) {
            return;
        }

        if ($this->cluster === null) {
            $this->open();
        }

        if (empty($this->userName) || empty($this->password)) {
            throw new InvalidConfigException($this->className() . '::userName/password cannot be empty.');
        }

        $token = 'Opening CouchbaseManager: ' . $this->userName;

        try {
            Yii::trace($token, __METHOD__);
            Yii::beginProfile($token, __METHOD__);

            $this->manager = $this->cluster->manager($this->userName, $this->password);

            Yii::endProfile($token, __METHOD__);
        }
        catch (\Exception $e) {
            Yii::endProfile($token, __METHOD__);

            throw new Exception($e->getMessage(), (int)$e->getCode(), $e);
        }
    }