\SwitchPortAssign
Users to switch port assign basic implementation
Synopsis
class SwitchPortAssign
{
- // constants
- const TABLE_ASSIGNS = 'switchportassign';
- const PROUTE_LOGIN = 'swassignlogin';
- const PROUTE_SWITCH = 'swassignswid';
- const PROUTE_PORT = 'swassignswport';
- const PROUTE_DELETE = 'swassigndelete';
- // members
- protected array $altCfg = ;
- protected $assignsDb = '';
- protected array $allSwitches = ;
- protected array $allAssigns = ;
- // methods
- public void __construct()
- protected void loadAlter()
- protected void initDb()
- protected void loadSwitches()
- protected array getAllSwitches()
- protected void loadAssigns()
- public array getAssignData()
- protected bool isPortFree()
- protected array getSameUsers()
- public void delete()
- public void/string save()
- public void catchChangeRequest()
- public string renderEditForm()
Constants
Name | Value |
---|---|
TABLE_ASSIGNS | 'switchportassign' |
PROUTE_LOGIN | 'swassignlogin' |
PROUTE_SWITCH | 'swassignswid' |
PROUTE_PORT | 'swassignswport' |
PROUTE_DELETE | 'swassigndelete' |
Members
protected
Methods
protected
- getAllSwitches() — Returns coinfurable switches array
- getSameUsers() — Returns all other users with assigned same port on the same switch
- initDb() — Inits assigns database abstraction layer
- isPortFree() — Checks is switch-port pair free or not
- loadAlter() — Loads system alter config into protected prop
- loadAssigns() — Loads all assigns data into protected prop
- loadSwitches()
public
- __construct()
- catchChangeRequest() — Switchport modification controller
- delete() — Deletes existing assign database record by user login
- getAssignData() — Returns some user assign data if it exists
- renderEditForm() — Returns users switch port assign form
- save() — Creates new or updates existing assign record