diff options
Diffstat (limited to 'application/models/Config.php')
| -rw-r--r-- | application/models/Config.php | 104 |
1 files changed, 69 insertions, 35 deletions
diff --git a/application/models/Config.php b/application/models/Config.php index e5263d0..2a2d503 100644 --- a/application/models/Config.php +++ b/application/models/Config.php @@ -2,42 +2,76 @@ class Application_Model_Config { + protected $_configID; + protected $_membershipID; + protected $_shellscript; + 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 config property'); + } + $this->$method($value); + } + + public function __get($name) + { + $method = 'get' . $name; + if (('mapper' == $name) || !method_exists($this, $method)) { + throw new Exception('Invalid config 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_configID() + { + return $this->_configID; + } + + public function set_configID($_configID) + { + $this->_configID = $_configID; + } + + public function get_membershipID() + { + return $this->_membershipID; + } + + public function set_membershipID($_membershipID) + { + $this->_membershipID = $_membershipID; + } + + public function get_shellscript() + { + return $this->_shellscript; + } + public function set_shellscript($_shellscript) + { + $this->_shellscript = $_shellscript; + } } |
