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

Public Member Functions

 get_default_vlan ()
 Returns default VLAN.
 count_all_vlans ()
 Get count of vlans.
 get_all_vlans ($limit_from=0, $limit_results=50, $order_by= 'tag_802_1q', $order_by_direction= 'ASC')
 Gets all VLANs.
 select_list ($key= 'id', $val=NULL, $order_val= 'tag_802_1q')
 Override default ORM function select_list due to need of ordering by another column than are key and value.
 get_devices_of_vlan ($vlan_id=NULL)
 Returns all devices which belong to VLAN.
 get_all_vlans_of_iface ($iface_id=null)
 Gets all VLANs of interface.
 get_default_vlan_of_interface ($iface_id=null)
 Gets default VLAN of iface.

Public Attributes

const DEFAULT_VLAN_TAG = 1
 Const for default VLAN.

Protected Attributes

 $has_many = array('ifaces_vlan')

Member Function Documentation

Vlan_Model::count_all_vlans ( )

Get count of vlans.

Returns
integer
Vlan_Model::get_all_vlans (   $limit_from = 0,
  $limit_results = 50,
  $order_by = 'tag_802_1q',
  $order_by_direction = 'ASC' 
)

Gets all VLANs.

Parameters
integer$limit_from
integer$limit_results
string$order_by
integer$order_by_direction
Returns
Mysql_Result
Vlan_Model::get_all_vlans_of_iface (   $iface_id = null)

Gets all VLANs of interface.

Parameters
integer$iface_id
Returns
Mysql_Result
Vlan_Model::get_default_vlan ( )

Returns default VLAN.

Author
Michal Kliment
Returns
Vlan_Model object
Vlan_Model::get_default_vlan_of_interface (   $iface_id = null)

Gets default VLAN of iface.

Parameters
integer$iface_id
Returns
Mysql_Result
Vlan_Model::get_devices_of_vlan (   $vlan_id = NULL)

Returns all devices which belong to VLAN.

Parameters
integer$vlan_id
Returns
Mysql_Result
Vlan_Model::select_list (   $key = 'id',
  $val = NULL,
  $order_val = 'tag_802_1q' 
)

Override default ORM function select_list due to need of ordering by another column than are key and value.

Author
Michal Kliment, Ondrej Fibich
Returns
array

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