Пример #1
0
 /**
  * Renvoie les Joueurs liés aux Parties de la collection fournie en paramètre
  * @param PartieCollection $parties
  * @return JoueurCollection
  */
 public static function getFromParties(PartieCollection $parties)
 {
     $ids = $parties->getIdsStr();
     if (!$ids) {
         return new JoueurCollection();
     }
     $req = "SELECT * FROM joueur WHERE idPartie IN (" . $ids . ");";
     return DbHandler::collFromQuery($req, 'Joueur', 'JoueurCollection');
 }
Пример #2
0
 /**
  * Renvoie les Parties liés aux Joueurs de cette collection
  * @return PartieCollection
  */
 public function getParties()
 {
     if (is_null($this->cacheParties)) {
         $this->cacheParties = PartieBusiness::getFromJoueurs($this);
         $this->cacheParties->store();
     }
     return $this->cacheParties;
 }
 /**
  * Renvoie les Infrastructures liés aux Parties de la collection fournie
  * @var PartieCollection $parties
  * @return InfrastructureCollection
  */
 public static function getFromParties(PartieCollection $parties)
 {
     $req = "SELECT * from infrastructure WHERE idHexa IN (SELECT hexa.idHexa FROM hexa WHERE hexa.idPartie IN (" . $parties->getIdsStr() . "))";
     return DbHandler::collFromQuery($req, 'Infrastructure', 'InfrastructureCollection');
 }
Пример #4
0
 /**
  * Renvoie les Qgs liés aux Parties de la collection fournie
  * @var PartieCollection $parties
  * @return QgCollection
  */
 public static function getFromParties(PartieCollection $parties)
 {
     $req = "SELECT * from qg WHERE idJoueur IN (SELECT joueur.IdJoueur FROM joueur WHERE joueur.idPartie IN (" . $parties->getIdsStr() . "))";
     return DbHandler::collFromQuery($req, 'Qg', 'QgCollection');
 }