startTime = time(); if(!$mpMap) { return; } $this->name = FORMATTER::stripDirtyCodes($mpMap->name); $this->uid = $mpMap->uId; $this->fileName = $mpMap->fileName; $this->authorLogin = $mpMap->author; $this->environment = $mpMap->environnement; $this->goldTime = $mpMap->goldTime; $this->copperPrice = $mpMap->copperPrice; $this->mapType = $mpMap->mapType; $this->mapStyle = $mpMap->mapStyle; if(isset($mpMap->nbCheckpoints)) { $this->nbCheckpoints = $mpMap->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; } } }