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(); }
/** * * @param string $path * @param array $options * @return FixtureCollection */ public function load($path, array $options = array()) { $data = Parser::fromFile($path); return FixtureCollection::create($data); }