/** * Load a config file or dir (no caching) * * @param Fs_Item $file_object * @param string $group * @return array */ protected function loadFile($file_object, $group = null) { if ($file_object instanceof Fs_File) { return Transform::with('unserialize-yaml')->process($file_object->path()); } elseif ($file_object instanceof Fs_Dir) { return $this->loadDir($file_object); } return array(); }
/** * Load a config file or dir * * @param Fs_Item $file_object * @param string $group * @return array */ protected function loadFile($file_object, $group = null) { if ($file_object instanceof Fs_File) { return Transform::with('unserialize-ini')->process($file_object->path()); } elseif (!empty($this->_options['recursive']) && $file_object instanceof Fs_Dir) { return $this->loadDir($file_object); } return array(); }
/** * Load a config file or dir (no caching) * * @param Fs_Item $file_object * @param string $group * @return array */ protected function loadFile($file_object, $group = null) { $settings = array(); if ($file_object instanceof Fs_File) { $settings = Transform::with('unserialize-json')->process($file_object->path()); if (!isset($settings)) { trigger_error("Failed to parse json file '{$file}'.", E_USER_WARNING); } } elseif (!empty($this->_options['recursive']) && $file_object instanceof Fs_Dir) { $settings = $this->loadDir($file_object); } return $settings; }