\UbillingDHCP
ISC-DHCPD server management class
Synopsis
class UbillingDHCP
{
- // constants
- const MULTINET_PATH = 'multinet/';
- const URL_ME = '?module=dhcp';
- const TEMPLATES_PATH = 'config/dhcp/';
- // members
- protected array $allDhcpNets = ;
- protected array $allMultinetNets = ;
- protected $messages = '';
- // methods
- public void __construct()
- protected void loadDhcpNets()
- protected void loadMultinetNets()
- protected void initMessages()
- public string renderNetsList()
- public string renderPanel()
- public string renderConfigPreviews()
- public string getConfigsRemote()
- public void downloadConfig()
- public void downloadTemplate()
- public string renderConfigTemplates()
- protected bool isNetUnused()
- public bool isConfigNameFree()
- protected string networkSelector()
- public array getNetworkData()
- public string addForm()
- public string editForm()
- public void createNetwork()
- public void updateNetwork()
- public void deleteNetwork()
- public void restartDhcpServer()
Constants
Name | Value |
---|---|
MULTINET_PATH | 'multinet/' |
URL_ME | '?module=dhcp' |
TEMPLATES_PATH | 'config/dhcp/' |
Members
protected
Methods
protected
- initMessages() — Creates new instance of message helper
- isNetUnused() — Checks is multinet netid used for one of DHCP nets or not
- loadDhcpNets() — Loads existing DHCP subnets from database into protected property
- loadMultinetNets() — Loads all of multinet networks for further usage
- networkSelector() — Renders network selector with not set DHCP handlers
public
- __construct()
- addForm() — Returns DHCP network addition form
- createNetwork() — Creates new DHCP network
- deleteNetwork() — Deletes existing DHCP network
- downloadConfig() — Downloads pregenerated DHCP config
- downloadTemplate() — Downloads DHCP config template
- editForm() — Renders network template editing form
- getConfigsRemote() — Returns json array of all available DHCP configs for remote deploy
- getNetworkData() — Returns DHCP network data by its id
- isConfigNameFree() — Checks is config name unused?
- renderConfigPreviews() — Renders generated configs previews list
- renderConfigTemplates() — Renders DHCP config templates previews
- renderNetsList() — Renders list of available DHCP networks with some controls
- renderPanel() — Renders main module controls
- restartDhcpServer() — Rebuilds all configs and restarts DHCP server
- updateNetwork() — Updates existing DHCP network handler