<?php
require_once(DIR_FS_ADMIN.DIR_WS_CLASSES.'country.php');
/**
 * countries class 
 *
 */
class countries extends databasetable
{
	/**
	 * initiates the countries class
	 *
	 */
	function countries(){
		$this->set_tablename(TABLE_COUNTRIES);
		$this->set_index('countries_id');
	}
	
	/**
	 * return a country object
	 *
	 * @param integer $id
	 * @return object
	 */
	function get_country($id){
		$values = $this->get_row_by_index($id);
		$country_instance = new country( (object) current($values) );
		return $country_instance;
	}
}
