FreenetIS
 All Classes Namespaces Functions Variables Pages
Public Member Functions | Protected Attributes | List of all members
Town_Model Class Reference
Inheritance diagram for Town_Model:
ORM

Public Member Functions

 __toString ()
 get_town ($zip_code=NULL, $town=NULL, $quarter=NULL)
 Check if town exists Exists - return it Not exists - create it a return it.
 get_all_towns ($limit_from=0, $limit_results=50, $order_by= 'id', $order_by_direction= 'asc', $filter_values=array())
 select_list_with_quater ()
 Gets list of towns for select box.

Protected Attributes

 $has_many = array('address_points', 'streets')

Member Function Documentation

Town_Model::__toString ( )
Author
Ondrej Fibich
Returns
string reprezentation of town
Town_Model::get_all_towns (   $limit_from = 0,
  $limit_results = 50,
  $order_by = 'id',
  $order_by_direction = 'asc',
  $filter_values = array() 
)
Parameters
integer$limit_from
integer$limit_results
string$order_by
string$order_by_direction
array$filter_values
Returns
Mysql_Result
Town_Model::get_town (   $zip_code = NULL,
  $town = NULL,
  $quarter = NULL 
)

Check if town exists Exists - return it Not exists - create it a return it.

Author
Michal Kliment
Parameters
string$zip_codezip code (if set to FALSE, do not search by ZIP code)
string$towntown
string$quarterquarter
Returns
Town_Model
Town_Model::select_list_with_quater ( )

Gets list of towns for select box.

Returns
array[string]

The documentation for this class was generated from the following file: