private function loadNewGameData() { $pgn = $this->getLocalPgnWithoutTags(); $pgnObj = new PGNParser(); $pgnObj->clearCacheFor($pgn); if (!preg_match("/\\.pgn/si", $this->remote_url)) { $dgtParser = new DGTGameParser(); $result = $dgtParser->createPgnFromDGTData($this->remote_url, $pgn, $this->id); } else { $pgnObj = new PGNParser(); $result = $pgnObj->createCopyOfRemotePgn($this->remote_url, $pgn, $this->id); } if ($result['success']) { if ($result['finished_round']) { $this->finishRound(); } else { $this->startRound(); } } }