コード例 #1
0
ファイル: CachingLoader.php プロジェクト: phoenixcms/config
 /**
  * @param string $path
  * @return HashMap
  */
 public function load($path)
 {
     if (!file_exists($path)) {
         throw new FileNotFoundException("File '{$path}' not found.");
     }
     return HashMap::from($this->cache->load($path, function (&$dependencies) use($path) {
         $dependencies[Cache::FILES] = $path;
         return Neon::decode(file_get_contents($path));
     }), TRUE);
 }
コード例 #2
0
ファイル: Module.php プロジェクト: phoenixcms/modules
 /**
  * @return string
  */
 public function getDependencies()
 {
     return iterator_to_array($this->config->getArray('dependencies'));
 }