diff options
Diffstat (limited to 'application/models/Group.php')
| -rw-r--r-- | application/models/Group.php | 104 |
1 files changed, 69 insertions, 35 deletions
diff --git a/application/models/Group.php b/application/models/Group.php index 60fefad..771c08b 100644 --- a/application/models/Group.php +++ b/application/models/Group.php @@ -2,42 +2,76 @@ class Application_Model_Group { + protected $_groupID; + protected $_title; + protected $_description; + 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 group property'); + } + $this->$method($value); + } + + public function __get($name) + { + $method = 'get' . $name; + if (('mapper' == $name) || !method_exists($this, $method)) { + throw new Exception('Invalid group 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_groupID() + { + return $this->_groupID; + } + + public function set_groupID($_groupID) + { + $this->_groupID = $_groupID; + } + + public function get_title() + { + return $this->_title; + } + + public function set_title($_title) + { + $this->_title = $_title; + } + + public function get_description() + { + return $this->_description; + } + public function set_description($_description) + { + $this->_description = $_description; + } } |
