/**
* Perform DB query to obtain list of airport codes.
*
* @return array An array of station information. Each entry contains:
* - icao: The ICAO identifier of the location.
* - name: The human readable name of the station.
* - country: The country the station is located in (if available).
*
* @throws Horde_Service_Weather_Exception
*/
protected function _getLocations()
{
if (empty($this->_db)) {
return array();
}
$sql = 'SELECT icao, name, state, municipality, country FROM ' . $this->_tableName . ' ORDER BY country';
try {
return $this->_db->selectAll($sql);
} catch (Horde_Exception $e) {
throw new Horde_Service_Weather_Exception($e);
}
}