<?php
require_once(DIR_FS_ADMIN.DIR_WS_CLASSES.'airport.php');
/**
 * airports class 
 *
 */
class airports extends databasetable
{
	/**
	 * initiates the airports class
	 *
	 */
	function airports(){
		$this->set_tablename(TABLE_AIRPORTS);
		$this->set_index('airports_id');
		/*
		$this->related_tables = array(
			0=>array('table'=>TABLE_CUSTOMERS_TO_COMPANIES,'key'=>$this->get_index() )
		);
		*/
	}
	
	/**
	 * return a airport object
	 *
	 * @param integer $id
	 * @return object
	 */
	function get_airport($id){
		$values = $this->get_row_by_index($id);
		$airport_instance = new airport( (object) current($values) );
		return $airport_instance;
	}
}
