예제 #1
0
파일: Toml.php 프로젝트: bruensicke/radium
 public static function file($file)
 {
     if (!file_exists($file)) {
         return array();
     }
     return TomlParser::fromFile($file);
 }
 public function load($filename)
 {
     if (!class_exists('Toml\\Parser')) {
         throw new \RuntimeException('Unable to read toml as the Toml Parser is not installed.');
     }
     $config = Parser::fromFile($filename);
     return $config ?: array();
 }
예제 #3
0
 /**
  *
  * @param  string $path
  * @param array $options
  * @return FixtureCollection
  */
 public function load($path, array $options = array())
 {
     $data = Parser::fromFile($path);
     return FixtureCollection::create($data);
 }