startTime = time(); if(!$rpc_infos) { return; } $this->name = FORMATTER::stripDirtyCodes($rpc_infos['Name']); $this->uid = $rpc_infos['UId']; $this->fileName = $rpc_infos['FileName']; $this->authorLogin = $rpc_infos['Author']; $this->environment = $rpc_infos['Environnement']; $this->goldTime = $rpc_infos['GoldTime']; $this->copperPrice = $rpc_infos['CopperPrice']; $this->mapType = $rpc_infos['MapType']; $this->mapStyle = $rpc_infos['MapStyle']; if(isset($rpc_infos['NbCheckpoints'])) { $this->nbCheckpoints = $rpc_infos['NbCheckpoints']; } $this->authorNick = $this->authorLogin; } /** * Checks if a map Update is available * * @return bool */ public function updateAvailable() { if($this->mx != null && ($this->lastUpdate < strtotime($this->mx->updated) || $this->uid != $this->mx->uid)) { return true; } else { return false; } } }