skeeks\cms\Config::getResult PHP Method

getResult() public method

public getResult ( ) : array
return array
    public function getResult()
    {
        \Yii::beginProfile('get config: ' . $this->name);
        if ($this->result === null) {
            \Yii::trace('cache allow ' . $this->name . ': ' . (int) $this->cacheIsAllow());
            //Разрешено использовать кэш
            if ($this->cacheIsAllow()) {
                \Yii::trace('cache read ' . $this->name . ' : ' . $this->getCacheFile());
                $this->result = (array) $this->readCache();
                if (count($this->result) < 5) {
                    \Yii::trace('cache file is empty ' . $this->name . ' : ' . $this->getCacheFile());
                    $this->result = (array) $this->merge();
                    $this->saveCache();
                }
            } else {
                $this->result = $this->merge();
            }
        }
        \Yii::endProfile('get config: ' . $this->name);
        return (array) $this->result;
    }