public function getSchema()
    {
        if ($this->cachedSchema === null) {
            return parent::getSchema();
        } else {
            if (is_object($this->cachedSchema))
                return $this->cachedSchema;
            else if (is_array($this->cachedSchema)) {
                $this->cachedSchema['db'] = $this;
                $this->cachedSchema = \Yii::createObject($this->cachedSchema);
                //$this->cachedSchema = new CachedSchema(['db' => $this]);
                return $this->cachedSchema;
            } else {
                throw new ConfigurationException('The "cachedSchema" property must be an configuration array');
            }
        }
    }