protected function getData($path) { if (file_exists($path)) { return (array) json_decode(file_get_contents($path), true); } else { return []; } }