From 156abd0d614adfffed22e1d4de3168c22bf611c6 Mon Sep 17 00:00:00 2001 From: Simon Date: Wed, 20 Apr 2011 18:00:20 +0200 Subject: Created bei Client hinzugefĆ¼gt --- application/models/Client.php | 10 ++++++++++ application/models/ClientMapper.php | 15 ++++++++++++--- 2 files changed, 22 insertions(+), 3 deletions(-) (limited to 'application/models') 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; } -- cgit v1.2.3-55-g7522