/**
  * @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');
 }
 /**
  * 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');
 }
Beispiel #3
0
 /**
  * Crée un Batiment lié à ce Hexa
  * @return Batiment
  */
 public function createBatiment()
 {
     $bat = new Batiment();
     $bat->setIdHexa($this->getIdHexa());
     return $bat;
 }