summaryrefslogtreecommitdiffstats
path: root/application/models/Person.php
diff options
context:
space:
mode:
authorBjörn Geiger2011-01-27 17:32:56 +0100
committerBjörn Geiger2011-01-27 17:32:56 +0100
commit7512229bcaaf39dc2ca6e9b18770db04a6f800fa (patch)
treea384ee6a40ce37d7b273cfa3309fb420f93fb9cf /application/models/Person.php
parentBootEntries entfernt (diff)
downloadpbs2-7512229bcaaf39dc2ca6e9b18770db04a6f800fa.tar.gz
pbs2-7512229bcaaf39dc2ca6e9b18770db04a6f800fa.tar.xz
pbs2-7512229bcaaf39dc2ca6e9b18770db04a6f800fa.zip
Getter und Setter für Models gesetzt
Diffstat (limited to 'application/models/Person.php')
-rw-r--r--application/models/Person.php214
1 files changed, 179 insertions, 35 deletions
diff --git a/application/models/Person.php b/application/models/Person.php
index a07133b..ec717b9 100644
--- a/application/models/Person.php
+++ b/application/models/Person.php
@@ -2,42 +2,186 @@
class Application_Model_Person
{
+ protected $_personID;
+ protected $_title;
+ protected $_name;
+ protected $_firstname;
+ protected $_street;
+ protected $_housenumber;
+ protected $_city;
+ protected $_postalcode;
+ protected $_logindate;
+ protected $_registerdate;
+ protected $_email;
+ protected $_login;
+ protected $_password;
+
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 person property');
+ }
+ $this->$method($value);
+ }
+
+ public function __get($name)
+ {
+ $method = 'get' . $name;
+ if (('mapper' == $name) || !method_exists($this, $method)) {
+ throw new Exception('Invalid person 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_personID()
+ {
+ return $this->_personID;
+ }
+
+ public function set_personID($_personID)
+ {
+ $this->_personID = $_personID;
+ }
+
+ public function get_title()
+ {
+ return $this->_title;
+ }
+
+ public function set_title($_title)
+ {
+ $this->_title = $_title;
+ }
+
+ public function get_name()
+ {
+ return $this->_name;
+ }
+
+ public function set_name($_name)
+ {
+ $this->_name = $_name;
+ }
+
+ public function get_firstname()
+ {
+ return $this->_firstname;
+ }
+
+ public function set_firstname($_firstname)
+ {
+ $this->_firstname = $_firstname;
+ }
+
+ public function get_street()
+ {
+ return $this->_street;
+ }
+
+ public function set_street($_street)
+ {
+ $this->_street = $_street;
+ }
+
+ public function get_housenumber()
+ {
+ return $this->_housenumber;
+ }
+
+ public function set_housenumber($_housenumber)
+ {
+ $this->_housenumber = $_housenumber;
+ }
+
+ public function get_city()
+ {
+ return $this->_city;
+ }
+
+ public function set_city($_city)
+ {
+ $this->_city = $_city;
+ }
+
+ public function get_postalcode()
+ {
+ return $this->_postalcode;
+ }
+
+ public function set_postalcode($_postalcode)
+ {
+ $this->_postalcode = $_postalcode;
+ }
+
+ public function get_logindate()
+ {
+ return $this->_logindate;
+ }
+
+ public function set_logindate($_logindate)
+ {
+ $this->_logindate = $_logindate;
+ }
+
+ public function get_registerdate()
+ {
+ return $this->_registerdate;
+ }
+
+ public function set_registerdate($_registerdate)
+ {
+ $this->_registerdate = $_registerdate;
+ }
+
+ public function get_email()
+ {
+ return $this->_email;
+ }
+
+ public function set_email($_email)
+ {
+ $this->_email = $_email;
+ }
+
+ public function get_login()
+ {
+ return $this->_login;
+ }
+
+ public function set_login($_login)
+ {
+ $this->_login = $_login;
+ }
+
+ public function get_password()
+ {
+ return $this->_password;
+ }
+ public function set_password($_password)
+ {
+ $this->_password = $_password;
+ }
}