protected function loadJson($file) { $fullpath = $this->config->dir_root . '/data/' . $file; if (!file_exists($fullpath)) { return null; } $jsonFile = json_decode(file_get_contents($fullpath)); return $jsonFile; }