function getFullDataEvent($evento) { try { $evento->fotos = getEventoFotos($evento->id); $evento->condiciones = DAOFactory::getEventoCondicionDAO()->queryByEventoId($evento->id); /* $evento->descripcionBreve = json_decode($evento->descripcionBreve); $evento->descripcionExtendida = json_decode($evento->descripcionExtendida); $evento->sugerenciasTpv = json_decode($evento->sugerenciasTpv); $evento->instruccionesConsumo = json_decode($evento->instruccionesConsumo); */ $tickets_a = getTicketsByEventoId($evento->id); $evento->tickets = $tickets_a['tickets']; $evento->precio_minimo = $tickets_a['precio_minimo']; $evento->campania = DAOFactory::getCampaniaDAO()->load($evento->campaniaId); $evento->destino = DAOFactory::getDestinoTuristicoDAO()->load($evento->destinoTuristicoId); $evento->direccion = DAOFactory::getDireccionDAO()->load($evento->direccionId); $evento->guias = unserialize($evento->guias); $duracion_h = sprintf("%02s", floor($evento->duracion)); $duracion_m = sprintf("%02s", ceil(($evento->duracion - $duracion_h) * 60)); $evento->duracion = $duracion_h . ':' . $duracion_m; return $evento; } catch (Exception $e) { return false; } }
function searchDestinos($term) { try { $destinos = DAOFactory::getDestinoTuristicoDAO()->queryByTerm($term); return $destinos; } catch (Exception $e) { var_dump($e); return false; } }