diff options
Diffstat (limited to 'application/models/Client.php')
| -rw-r--r-- | application/models/Client.php | 104 |
1 files changed, 69 insertions, 35 deletions
diff --git a/application/models/Client.php b/application/models/Client.php index d09f7ce..5b0ebb0 100644 --- a/application/models/Client.php +++ b/application/models/Client.php @@ -2,42 +2,76 @@ class Application_Model_Client { + protected $_clientID; + protected $_macadress; + protected $_hardwarehash; + public function __construct(array $options = null) - { - if (is_array($options)) { - $this->setOptions($options); - } - } - - public function __set($name, $value) - { - $method = 'set' . $name; - if (('mapper' == $name) || !method_exists($this, $method)) { - throw new Exception('Invalid guestbook property'); - } - $this->$method($value); - } - - public function __get($name) - { - $method = 'get' . $name; - if (('mapper' == $name) || !method_exists($this, $method)) { - throw new Exception('Invalid guestbook property'); - } - return $this->$method(); - } - - public function setOptions(array $options) - { - $methods = get_class_methods($this); - foreach ($options as $key => $value) { - $method = 'set' . ucfirst($key); - if (in_array($method, $methods)) { - $this->$method($value); - } - } - return $this; - } + { + if (is_array($options)) { + $this->setOptions($options); + } + } + + public function __set($name, $value) + { + $method = 'set' . $name; + if (('mapper' == $name) || !method_exists($this, $method)) { + throw new Exception('Invalid client property'); + } + $this->$method($value); + } + + public function __get($name) + { + $method = 'get' . $name; + if (('mapper' == $name) || !method_exists($this, $method)) { + throw new Exception('Invalid client property'); + } + return $this->$method(); + } + + public function setOptions(array $options) + { + $methods = get_class_methods($this); + foreach ($options as $key => $value) { + $method = 'set' . ucfirst($key); + if (in_array($method, $methods)) { + $this->$method($value); + } + } + return $this; + } + + + public function get_clientID() + { + return $this->_clientID; + } + + public function set_clientID($_clientID) + { + $this->_clientID = $_clientID; + } + + public function get_macadress() + { + return $this->_macadress; + } + + public function set_macadress($_macadress) + { + $this->_macadress = $_macadress; + } + + public function get_hardwarehash() + { + return $this->_hardwarehash; + } + public function set_hardwarehash($_hardwarehash) + { + $this->_hardwarehash = $_hardwarehash; + } } |
