M1\Vars\Vars::loadFromCache PHP Method

loadFromCache() private method

Loads the cached file into the current class
private loadFromCache ( )
    private function loadFromCache()
    {
        $this->cache->load();
        $passed_keys = array('path', 'content', 'extensions', 'loaders', 'resources', 'replacements', 'globals');
        $loaded_vars = get_object_vars($this->cache->getLoadedVars());
        foreach ($loaded_vars as $key => $value) {
            if (in_array($key, $passed_keys)) {
                $this->{$key} = $value;
            }
        }
        $this->cache->setTime($loaded_vars['cache']->getTime());
    }