/** * Load all settings (eager load). * (fluent interface) * * @return Config_Dir */ protected function loadAll() { if (!isset($this->_path) || !$this->_path instanceof Fs_Dir) { throw new Exception("Unable to create Config object: Path not specified or not instance of Fs_Dir"); } $options = array(); if ($this->_transformer) { $options['transformer'] = $this->_transformer; } if ($this->_ext) { $options['ext'] = $this->_ext; } $options['loadall'] = true; foreach ($this->_path as $key => $file) { if ($file instanceof Fs_Dir) { if (!isset($this[$file->filename()])) { parent::offsetSet($file->filename(), new Config_Dir($file, $options)); } } elseif ($file instanceof Fs_File) { if (isset($this->_ext) && substr($file, -strlen($this->_ext)) != $this->_ext) { continue; } if (!isset($this[$file->filename()])) { parent::offsetSet($file->filename(), new Config_File($file, $options)); } } } return $this; }