summaryrefslogtreecommitdiffstats
path: root/application/models/Membership.php
diff options
context:
space:
mode:
authorBjörn Geiger2011-04-13 15:43:34 +0200
committerBjörn Geiger2011-04-13 15:43:34 +0200
commit89376dc8bef5548fff83c78034471614f24fcb9b (patch)
treed580b52cb258e5180d164d9f108c4f9ff1b820c1 /application/models/Membership.php
parentminor (diff)
downloadpbs2-89376dc8bef5548fff83c78034471614f24fcb9b.tar.gz
pbs2-89376dc8bef5548fff83c78034471614f24fcb9b.tar.xz
pbs2-89376dc8bef5548fff83c78034471614f24fcb9b.zip
Suspend und Resume Membership + Decline Grouprequest
Diffstat (limited to 'application/models/Membership.php')
-rw-r--r--application/models/Membership.php60
1 files changed, 35 insertions, 25 deletions
diff --git a/application/models/Membership.php b/application/models/Membership.php
index eaa1f97..8a18d11 100644
--- a/application/models/Membership.php
+++ b/application/models/Membership.php
@@ -6,6 +6,7 @@ class Application_Model_Membership
protected $_groupID;
protected $_roleID;
protected $_personID;
+ protected $_suspended;
public function __construct(array $options = null)
{
@@ -81,39 +82,48 @@ class Application_Model_Membership
$this->_personID = $_personID;
return $this;
}
- /**
- * Returns current data as associative array using ReflectionClass
- *
- * @return array Returns associative array containing model data
+ public function getSuspended()
+ {
+ return $this->_suspended;
+ }
+ public function setSuspended($_suspended)
+ {
+ $this->_suspended = $_suspended;
+ return $this;
+ }
+ /**
+ * Returns current data as associative array using ReflectionClass
+ *
+ * @return array Returns associative array containing model data
* If "get"-method not available (our primary keys) the function getID() is called
- */
- public function toArray()
- {
- $reflectionClass = new ReflectionClass($this);
- $properties = $reflectionClass->getProperties();
- $result = array();
- foreach ($properties as $property) {
- $key = $property->name;
- if (substr($key, 0, 1) != '_' && $this->$key !== null) {
- $method = 'get' . ucfirst($key);
- if ($reflectionClass->hasMethod($method)) {
- $result[$key] = $this->$method();
- } else {
- $result[$key] = $this->$key;
- }
- }
+ */
+ public function toArray()
+ {
+ $reflectionClass = new ReflectionClass($this);
+ $properties = $reflectionClass->getProperties();
+ $result = array();
+ foreach ($properties as $property) {
+ $key = $property->name;
+ if (substr($key, 0, 1) != '_' && $this->$key !== null) {
+ $method = 'get' . ucfirst($key);
+ if ($reflectionClass->hasMethod($method)) {
+ $result[$key] = $this->$method();
+ } else {
+ $result[$key] = $this->$key;
+ }
+ }
elseif(substr($key, 0, 1) == '_' && $this->$key !== null) {
$key = substr($key, 1);
- $method = 'get' . ucfirst($key);
+ $method = 'get' . ucfirst($key);
if ($reflectionClass->hasMethod($method)) {
$result[$key] = $this->$method();
}else{
$result[$key] = $this->getID();
}
-
+
}
- }
- return $result;
- }
+ }
+ return $result;
+ }
}