<?php
require_once(DIR_FS_ADMIN.DIR_WS_CLASSES.'address_book.php');

/**
 * address_books class
 *
 */
class address_books extends databasetable
{
	/**
	 * initiate address_books class
	 *
	 */
	function address_books(){
		$this->set_tablename(TABLE_ADDRESS_BOOKS);
		$this->set_filename(FILENAME_ADDRESS_BOOKS);
		$this->set_index('address_book_id');
	}
	
	/**
	 * return a address_book object
	 *
	 * @param integer $id
	 * @return object
	 */
	function get_address_book($id){
		$values = $this->get_row_by_index($id);
		$address_book_instance = new address_book( (object) current($values) );
		return $address_book_instance;
	}
}
