Allow JsonLoader to load by file name

main
Jordi Boggiano 13 years ago
parent 293c45fabe
commit f572bbb0bf

@ -23,6 +23,8 @@ class JsonLoader extends ArrayLoader
{
if ($json instanceof JsonFile) {
$config = $json->read();
} elseif (file_exists($json)) {
$config = JsonFile::parseJson(file_get_contents($json));
} elseif (is_string($json)) {
$config = JsonFile::parseJson($json);
}

Loading…
Cancel
Save