summaryrefslogtreecommitdiffstats
path: root/application/models
diff options
context:
space:
mode:
Diffstat (limited to 'application/models')
-rw-r--r--application/models/ConfigMapper.php4
-rw-r--r--application/models/GroupMapper.php4
-rw-r--r--application/models/MembershipMapper.php4
-rw-r--r--application/models/PersonMapper.php4
4 files changed, 12 insertions, 4 deletions
diff --git a/application/models/ConfigMapper.php b/application/models/ConfigMapper.php
index dc2a524..da7a073 100644
--- a/application/models/ConfigMapper.php
+++ b/application/models/ConfigMapper.php
@@ -66,8 +66,9 @@ class Application_Model_ConfigMapper
}
}
- public function find($id, Application_Model_Config $config)
+ public function find($id)
{
+ $config = new Application_Model_Config();
$result = $this->getDbTable()->find($id);
if (0 == count($result)) {
return;
@@ -76,6 +77,7 @@ class Application_Model_ConfigMapper
$row = $result->current();
$config->setID($row->configID)->setGroupID($row->groupID)->setMembershipID($row->membershipID)->setCreated($row->created)->setShellscript($row->shellscript)->setTitle($row->title);
+ return $config;
}
public function fetchAll()
diff --git a/application/models/GroupMapper.php b/application/models/GroupMapper.php
index f48fc5f..d43b3f1 100644
--- a/application/models/GroupMapper.php
+++ b/application/models/GroupMapper.php
@@ -66,8 +66,9 @@ class Application_Model_GroupMapper
}
}
- public function find($id, Application_Model_Group $group)
+ public function find($id)
{
+ $group = new Application_Model_Group();
$result = $this->getDbTable()->find($id);
if (0 == count($result)) {
return;
@@ -76,6 +77,7 @@ class Application_Model_GroupMapper
$row = $result->current();
$group->setID($row->groupID)->setTitle($row->title)->setDescription($row->description);
+ return $group;
}
public function fetchAll()
diff --git a/application/models/MembershipMapper.php b/application/models/MembershipMapper.php
index 58fa9d5..2a6e57d 100644
--- a/application/models/MembershipMapper.php
+++ b/application/models/MembershipMapper.php
@@ -66,8 +66,9 @@ class Application_Model_MembershipMapper
}
}
- public function find($id, Application_Model_Membership $membership)
+ public function find($id)
{
+ $membership = new Application_Model_Membership();
$result = $this->getDbTable()->find($id);
if (0 == count($result)) {
return;
@@ -76,6 +77,7 @@ class Application_Model_MembershipMapper
$row = $result->current();
$membership->setID($row->membershipID)->setGroupID($row->groupID)->setRoleID($row->roleID)->setPersonID($row->personID);
+ return $membership;
}
public function fetchAll()
diff --git a/application/models/PersonMapper.php b/application/models/PersonMapper.php
index 74f7250..038670d 100644
--- a/application/models/PersonMapper.php
+++ b/application/models/PersonMapper.php
@@ -66,8 +66,9 @@ class Application_Model_PersonMapper
}
}
- public function find($id, Application_Model_Person $person)
+ public function find($id)
{
+ $person = new Application_Model_Person();
$result = $this->getDbTable()->find($id);
if (0 == count($result)) {
return;
@@ -76,6 +77,7 @@ class Application_Model_PersonMapper
$row = $result->current();
$person->setID($row->personID)->setTitle($row->title)->setName($row->name)->setFirstname($row->firstname)->setStreet($row->street)->setHousenumber($row->housenumber)->setCity($row->city)->setPostalcode($row->postalcode)->setLogindate($row->logindate)->setRegisterdate($row->registerdate)->setEmail($row->email)->setLogin($row->login)->setPassword($row->password)->setPasswordSalt($row->password_salt);
+ return $person;
}
public function fetchAll()