Exemplo n.º 1
0
 public static function getListHotelesTO($hoteles)
 {
     $hotelesList = new ArrayCollection();
     if (count($hoteles) > Generalkeys::NUMBER_ZERO) {
         foreach ($hoteles as $h) {
             $hotls = new HotelTO();
             $hotls->setId($h['id']);
             $hotls->setIdEstatus($h['id_estatus']);
             $hotls->setIdDestino($h['id_destino']);
             $hotls->setDescripcion($h['descripcion']);
             $hotls->setEstrellas($h['estrellas']);
             $hotls->setPromovido($h['promovido']);
             $hotelesList->add($hotls);
         }
     }
     return $hotelesList;
 }
Exemplo n.º 2
0
 public static function getDetailHotel($hotel, $imagenes)
 {
     $hotelTO = new HotelTO();
     $hotelTO->setId($hotel['id']);
     $hotelTO->setEstrellas($hotel['estrellas']);
     $hotelTO->setNombreHotel($hotel['nombrehotel']);
     $hotelTO->setDescripcion($hotel['descripcion']);
     $hotelTO->setPrincipalImage($hotel['path']);
     $hotelTO->setSimboloMoneda($hotel['simbolo']);
     $hotelTO->setMapa($hotel['mapa']);
     if (count($imagenes) > Generalkeys::NUMBER_ZERO) {
         $hotelTO->setImagenesHotel($imagenes);
     }
     return $hotelTO;
 }