/** * Renvoie les Trajs liés à l'objet * @return TrajCollection */ public function getTrajs() { if (is_null($this->cacheTrajs)) { $this->cacheTrajs = TrajBusiness::getByQg($this); $this->cacheTrajs->store(); } return $this->cacheTrajs; }
/** * Génère le JSON des trajectoires des Qgs * @return string */ public function getTrajectoires() { $trajs = TrajBusiness::getFromIdsQgs(CacheCarte::$idsStrQgs[CacheCarte::$centre2CoinGauche[$this->getCentre()->getId() . '_' . $this->getLargeur() . '_' . $this->getHauteur()] . '_' . $this->joueur->getId()])->filterByDroitVoirTraj($this->joueur); return ',"trajectoires":' . $trajs->getJSon(); }
/** * @return void */ public function delete() { TrajBusiness::delete($this); }