123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230 |
- <?php
- namespace HostBundle\Traits;
- use Doctrine\ORM\Mapping as ORM;
- trait DHCPOptionTrait
- {
- protected $json_dhcp_option_config;
- /**
- * @ORM\PreUpdate
- * @ORM\PrePersist
- */
- public function doDHCPOptionsPrePersist()
- {
- $this->setOptions(json_encode($this->getDHCPOption()));
- }
-
- /**
- * @ORM\PostLoad
- */
- public function PostLoad()
- {
- $this->setDHCPOption(json_decode($this->getOptions(), true));
- }
- function getDHCPOption()
- {
- return $this->json_dhcp_option_config;
- }
- function setDHCPOption($config)
- {
- $this->json_dhcp_option_config = $config;
- }
- function setFilename($value)
- {
- $this->json_dhcp_option_config['filename'] = $value;
- }
- function getFilename()
- {
- return @$this->json_dhcp_option_config['filename'];
- }
- function setSubnetMask($value)
- {
- $this->json_dhcp_option_config['subnet_mask'] = $value;
- }
- function getSubnetMask()
- {
- return @$this->json_dhcp_option_config['subnet_mask'];
- }
- function setTimeOffset($value)
- {
- $this->json_dhcp_option_config['time_offset'] = $value;
- }
- function getTimeOffset()
- {
- return @$this->json_dhcp_option_config['time_offset'];
- }
- function setRouters($value)
- {
- $this->json_dhcp_option_config['routers'] = $value;
- }
- function getRouters()
- {
- return @$this->json_dhcp_option_config['routers'];
- }
- function setDomainNameServers($value)
- {
- $this->json_dhcp_option_config['domain_name_servers'] = $value;
- }
- function getDomainNameServers()
- {
- return @$this->json_dhcp_option_config['domain_name_servers'];
- }
- function setHostName($value)
- {
- $this->json_dhcp_option_config['host_name'] = $value;
- }
- function getHostName()
- {
- return @$this->json_dhcp_option_config['host_name'];
- }
- function setDomainName($value)
- {
- $this->json_dhcp_option_config['domain_name'] = $value;
- }
- function getDomainName()
- {
- return @$this->json_dhcp_option_config['domain_name'];
- }
- function setBroadcastAddress($value)
- {
- $this->json_dhcp_option_config['broadcast_address'] = $value;
- }
- function getBroadcastAddress()
- {
- return @$this->json_dhcp_option_config['broadcast_address'];
- }
- function setDefaultLeaseTime($value)
- {
- $this->json_dhcp_option_config['default_lease_time'] = $value;
- }
- function getDefaultLeaseTime()
- {
- return @$this->json_dhcp_option_config['default_lease_time'];
- }
- function setMaxLeaseTime($value)
- {
- $this->json_dhcp_option_config['max_lease_time'] = $value;
- }
- function getMaxLeaseTime()
- {
- return @$this->json_dhcp_option_config['max_lease_time'];
- }
- function setNextServer($value)
- {
- $this->json_dhcp_option_config['next_server'] = $value;
- }
- function getNextServer()
- {
- return @$this->json_dhcp_option_config['next_server'];
- }
- function setTftpServerName($value)
- {
- $this->json_dhcp_option_config['tftp_server'] = $value;
- }
- function getTftpServerName()
- {
- return @$this->json_dhcp_option_config['tftp_server'];
- }
- function setOption122DhcpServer($value)
- {
- $this->json_dhcp_option_config['option122.dhcp-server'] = $value;
- }
- function getOption122DhcpServer()
- {
- return @$this->json_dhcp_option_config['option122.dhcp-server'];
- }
- function setOption122DhcpServerSecondary($value)
- {
- $this->json_dhcp_option_config['option122.dhcp-server-secondary'] = $value;
- }
- function getOption122DhcpServerSecondary()
- {
- return @$this->json_dhcp_option_config['option122.dhcp-server-secondary'];
- }
- function setOption122ProvisioningServer($value)
- {
- $this->json_dhcp_option_config['option122.provisioning-server'] = $value;
- }
- function getOption122ProvisioningServer()
- {
- return @$this->json_dhcp_option_config['option122.provisioning-server'];
- }
- function setOption122ProvisioningType($value)
- {
- $this->json_dhcp_option_config['option122.provisioning-type'] = $value;
- }
- function getOption122ProvisioningType()
- {
- return @$this->json_dhcp_option_config['option122.provisioning-type'];
- }
- function setLogServers($value)
- {
- $this->json_dhcp_option_config['log_servers'] = $value;
- }
- function getLogServers()
- {
- return @$this->json_dhcp_option_config['log_servers'];
- }
- function setTimeServers($value)
- {
- $this->json_dhcp_option_config['time_servers'] = $value;
- }
- function getTimeServers()
- {
- return @$this->json_dhcp_option_config['time_servers'];
- }
- function setFixedAddress($value)
- {
- $this->json_dhcp_option_config['fixed_address'] = $value;
- }
- function getFixedAddress()
- {
- return @$this->json_dhcp_option_config['fixed_address'];
- }
- }
|