loadFromArray($stateArray); } } $history = new \EOG\Models\MatchHistory(); if (file_exists(HISTORY_JSON)) { $raw_json = file_get_contents(HISTORY_JSON); $stateArray = json_decode($raw_json, true); if (is_array($stateArray)) { $history->loadState($stateArray); } }