/** * Initialize class, retrieve location data from DB, generate calendar dates to query against * @param string $apiKey authentication string used used query Hotwire.com */ function __construct($apiKey) { $this->apiKey = $apiKey; $registry = Registry::get_instance(); $this->dataHandler = $registry->get('DataHandler'); $this->locations = $this->dataHandler->get_airports(); $this->queryDates = $this->generate_query_dates(); }
/** * Get an array of airport_codes from the DB, along with their respective database ids * @return array airport data */ private function get_airports() { return $this->dataHandler->get_airports(); }