1
0
Fork 0

Allow JsonLoader to load by file name

pull/90/merge
Jordi Boggiano 2011-11-05 23:53:40 +01:00
parent 293c45fabe
commit f572bbb0bf
1 changed files with 2 additions and 0 deletions

View File

@ -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);
}