Exemplo n.º 1
0
 /**
  * @param Batiment $batiment
  * @return BatimentCollection
  */
 public static function getNiveauxAuDessus(Batiment $batiment)
 {
     $req = "SELECT * from batiment WHERE idHexa = " . $batiment->getIdHexa() . " AND idType = " . $batiment->getIdType() . " AND niveau > " . $batiment->getNiveau() . ";";
     return DbHandler::collFromQuery($req, 'Batiment', 'BatimentCollection');
 }
Exemplo n.º 2
0
 /**
  * Renvoie les Production liées à un Batiment
  * @param Batiment $batiment
  * @return ProductionCollection
  */
 public static function getByBatiment(Batiment $batiment)
 {
     $req = "SELECT * FROM production WHERE idBatiment = '" . $batiment->getIdBatiment() . "';";
     return DbHandler::collFromQuery($req, 'Production', 'ProductionCollection');
 }
Exemplo n.º 3
0
 /**
  * Crée un Batiment lié à ce Hexa
  * @return Batiment
  */
 public function createBatiment()
 {
     $bat = new Batiment();
     $bat->setIdHexa($this->getIdHexa());
     return $bat;
 }