public function load($file) { $data = file_get_contents($file, true); if ($data === false) { throw new JsonException('`:file` configure file can not be loaded', ['file' => $file]); } else { return json_decode($data, true); } }