/** * @param string $apiKey */ public function __construct($apiKey) { $this->browseQuotesServiceUrl = self::API_HOST . '/apiservices/browsequotes/v1.0'; $this->browseRoutesServiceUrl = self::API_HOST . '/apiservices/browseroutes/v1.0'; $this->browseDatesServiceUrl = self::API_HOST . '/apiservices/browsedates/v1.0'; $this->browseGridServiceUrl = self::API_HOST . '/apiservices/browsegrid/v1.0'; parent::__construct($apiKey); }
<div id="results-wrapper"> <h2>Search results</h2> <h3><?php echo $from_airports[0]['title']; ?> to <?php echo $to_airports[0]['title']; ?> </h3> <form action="/"> <input type="hidden" name="action" value="book_flight"> <?php $Flights = new Flights(); if ($user_data['departure-date']) { $flights = $Flights->find($from_airports[0], $to_airports[0], $user_data['departure-date']); ?> <div id="outgoing"> <h4>Outgoing</h4> <?php foreach ($flights as $flight) { ?> <ul> <li><?php echo $flight['dairport']['title']; ?> </li> <li><?php echo date('F jS Y', strtotime($flight['ddate'])); ?> </li> <li><?php
public function searchFlights($mro) { try { //var_dump($mro); echo 'LMwebSoapClient searchFlights'; $result = $this->sc->searchFlights(array('mro' => $mro->getParamsAsArray()))->return; } catch (Exception $ex) { echo $ex->getMessage(); return null; } /*if ($result->flights->info == "NOHIT") { Template::errorTemplate("Keine Treffer gefunden"); return null; }*/ $flights = new Flights(); $flights->setParamsByArray($result); //var_dump($result); $flightList = array(); if ($result->flights->offers != null) { if (is_array($result->flights->flightList)) { foreach ($result->flights->flightList as $value) { $flight = new Flight(); $flight->setParamsByArray($value); array_push($flightList, $flight); } } else { $flight = new Flight(); $flight->setParamsByArray($result->flights->flightList); array_push($flightList, $flight); } } else { // Template::errorTemplate("Keine Treffer gefunden"); echo 'Keine Treffer gefunden'; return null; } $flights->setFlightList($flightList); return $flights; }
echo $voyage->getNumberOfPeople($i) . ' ' . __("person per estimated", 'sage'); ?> </a> <span class="right floated"> <i class="sun icon"></i><?php echo $voyage->getDays($i) . ' ' . __('days', 'sage'); ?> / <i class="moon icon"></i><?php echo $voyage->getNights($i) . ' ' . __('nights', 'sage'); ?> </span> </div> <!-- Estimate Voyage Flights --> <?php Flights::display_flights($voyage->getFlights($i)); ?> <!-- Estimate Accommodation Flights --> <?php Accommodations::display_accommodations($voyage->getAccommodations($i)); ?> </div> </div> <?php } ?> </div> <?php } else { ?> <h3><?php