/** * Loads in a yaml config file, flattens it and stores the results * @param string $resource - the name of the file resource to load */ public function load($resource) { // Look for the cached config and try and use that if (file_exists($this->configPath)) { // The file has been generated and exists, so include it // It contains a class called ConfigStore require $this->configPath; // create the store object and copy the data from it $configStore = new ConfigStore(); $this->all = $configStore->getSettings(); } else { // Load the resource and set up the config $this->loadResource($resource); // write the config settings to the cache class? $this->writeCachedClass(); } }