summaryrefslogtreecommitdiffstats
path: root/application/models
diff options
context:
space:
mode:
authorSimon2011-04-20 18:00:20 +0200
committerSimon2011-04-20 18:00:20 +0200
commit156abd0d614adfffed22e1d4de3168c22bf611c6 (patch)
tree6eac79e0c19ff6a8f5d0983b2090019d38a343a4 /application/models
parentBootOsUser und HomeType Models hinzugefügt (diff)
downloadpbs2-156abd0d614adfffed22e1d4de3168c22bf611c6.tar.gz
pbs2-156abd0d614adfffed22e1d4de3168c22bf611c6.tar.xz
pbs2-156abd0d614adfffed22e1d4de3168c22bf611c6.zip
Created bei Client hinzugefügt
Diffstat (limited to 'application/models')
-rw-r--r--application/models/Client.php10
-rw-r--r--application/models/ClientMapper.php15
2 files changed, 22 insertions, 3 deletions
diff --git a/application/models/Client.php b/application/models/Client.php
index a63e8ba..e8108ef 100644
--- a/application/models/Client.php
+++ b/application/models/Client.php
@@ -16,6 +16,7 @@ class Application_Model_Client
protected $_groupID;
protected $_macadress;
protected $_hardwarehash;
+ protected $_created;
public function __construct(array $options = null)
{
@@ -91,6 +92,15 @@ class Application_Model_Client
$this->_hardwarehash = $_hardwarehash;
return $this;
}
+ public function getCreated()
+ {
+ return $this->_created;
+ }
+ public function setCreated($_created)
+ {
+ $this->_created = $_created;
+ return $this;
+ }
/**
* Returns current data as associative array using ReflectionClass
*
diff --git a/application/models/ClientMapper.php b/application/models/ClientMapper.php
index d727352..bcb3286 100644
--- a/application/models/ClientMapper.php
+++ b/application/models/ClientMapper.php
@@ -87,7 +87,8 @@ class Application_Model_ClientMapper
$data = array('clientID'=> $client->getID() ,
'groupID' => $client->getGroupID(),
'macadress'=> $client->getMacadress() ,
- 'hardwarehash'=> $client->getHardwarehash()
+ 'hardwarehash'=> $client->getHardwarehash(),
+ 'created'=> $client->getCreated()
);
if (null === ($id = $client->getID()) ) {
@@ -116,7 +117,11 @@ class Application_Model_ClientMapper
$row = $result->current();
- $client->setID($row->clientID)->setGroupID($row->groupID)->setMacadress($row->macadress)->setHardwarehash($row->hardwarehash);
+ $client->setID($row->clientID)
+ ->setGroupID($row->groupID)
+ ->setMacadress($row->macadress)
+ ->setHardwarehash($row->hardwarehash)
+ ->setCreated($row->created);
}
public function fetchAll()
@@ -126,7 +131,11 @@ class Application_Model_ClientMapper
foreach ($resultSet as $row) {
$entry = new Application_Model_Client();
- $entry->setID($row->clientID)->setGroupID($row->groupID)->setMacadress($row->macadress)->setHardwarehash($row->hardwarehash);
+ $entry->setID($row->clientID)
+ ->setGroupID($row->groupID)
+ ->setMacadress($row->macadress)
+ ->setHardwarehash($row->hardwarehash)
+ ->setCreated($row->created);
$entries[] = $entry;
}