diff options
Diffstat (limited to 'application/models/Role.php')
| -rw-r--r-- | application/models/Role.php | 115 |
1 files changed, 80 insertions, 35 deletions
diff --git a/application/models/Role.php b/application/models/Role.php index 67df23a..e8812b9 100644 --- a/application/models/Role.php +++ b/application/models/Role.php @@ -2,42 +2,87 @@ class Application_Model_Role { + protected $_roleID; + 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 role property'); + } + $this->$method($value); + } + + public function __get($name) + { + $method = 'get' . $name; + if (('mapper' == $name) || !method_exists($this, $method)) { + throw new Exception('Invalid role 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_roleID() + { + return $this->_roleID; + } + + public function set_roleID($_roleID) + { + $this->_roleID = $_roleID; + } + + 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; + } } |
