示例#1
0
 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);
 }