diff --git a/application/models/BlogPost.php b/application/models/BlogPost.php index ff12b5c..4f6f05b 100644 --- a/application/models/BlogPost.php +++ b/application/models/BlogPost.php @@ -85,7 +85,6 @@ class BlogPost return true; } - public function isPublished($flag = null) { if (null === $flag) { @@ -94,5 +93,4 @@ class BlogPost $this->_isPublished = (boolean)$flag; } - } \ No newline at end of file diff --git a/application/models/User.php b/application/models/User.php index 2d31159..6a6adf0 100644 --- a/application/models/User.php +++ b/application/models/User.php @@ -3,7 +3,7 @@ * User * */ -class User +class User extends Fiktiv_Model_Abstract { protected $_id = 0; protected $_email; @@ -30,7 +30,6 @@ class User return false; } - /** * Set user lastname * @@ -47,7 +46,6 @@ class User return false; } - /** * Set user firstname * @@ -66,7 +64,6 @@ class User return false; } - /** * Set the user registration date * @@ -90,7 +87,6 @@ class User return true; } - /** * Returns the user registration date * @@ -101,7 +97,6 @@ class User return !empty($_regDate) ? $_regDate : false; } - /** * Returns the current status of the account. * @@ -112,19 +107,6 @@ class User return !$this->_isDeleted; } - - public function __call($name,$args) { - - // getX methods - if ('get' == substr($name,0,3)) { - $dataPart = '_'.lcfirst(substr($name,3)); - if (isset($this->$dataPart)) - return $this->$dataPart; - } - - } - - /** * String representation of the object * @return string diff --git a/library/Fiktiv/Model/Abstract.php b/library/Fiktiv/Model/Abstract.php new file mode 100644 index 0000000..3df45a0 --- /dev/null +++ b/library/Fiktiv/Model/Abstract.php @@ -0,0 +1,15 @@ +$dataPart) ? $this->$dataPart : false; + } + } +} \ No newline at end of file