\SwitchAuth
Switches auth data abstraction
Synopsis
class SwitchAuth
{
- // constants
- const TABLE_AUTH = 'switchauth';
- const URL_ME = '?module=switchauth';
- const URL_SWPROFILE = '?module=switches&edit=';
- const ROUTE_DEVID = 'switchid';
- const PROUTE_DEVID = 'swithcauthdeviceid';
- const PROUTE_LOGIN = 'switchauthlogin';
- const PROUTE_PASSWORD = 'switchauthpassword';
- const PROUTE_ENABLE = 'switchauthenablepass';
- // members
- protected integer $switchId = 0;
- protected $authDb = '';
- protected array $allAuthData = ;
- protected $messages = '';
- // methods
- public void __construct()
- protected void setSwitchId()
- protected void initMessages()
- protected void initDb()
- protected void loadAuthData()
- public array|void getAuthData()
- public array getAllAuthData()
- public string renderEditForm()
- public void setAuthData()
- public void flushAuthData()
Constants
| Name | Value |
|---|---|
| TABLE_AUTH | 'switchauth' |
| URL_ME | '?module=switchauth' |
| URL_SWPROFILE | '?module=switches&edit=' |
| ROUTE_DEVID | 'switchid' |
| PROUTE_DEVID | 'swithcauthdeviceid' |
| PROUTE_LOGIN | 'switchauthlogin' |
| PROUTE_PASSWORD | 'switchauthpassword' |
| PROUTE_ENABLE | 'switchauthenablepass' |
Members
protected
Methods
protected
- initDb() — Initializes the database abstraction layer
- initMessages() — Initializes the messages property with an instance of UbillingMessageHelper.
- loadAuthData() — Loads available auth data into allAuthData property
- setSwitchId() — Current instance switchId setter
public
- __construct()
- flushAuthData() — Flushes some device auth data record from database
- getAllAuthData() — Returns auth data for all devices
- getAuthData() — Returns auth data for some specified device
- renderEditForm() — Returns current device auth edit form
- setAuthData() — Sets the authentication data for a device.