From 25ac1a8e603fdaab8dd3851a7c8fd4fb353cc548 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 9 Feb 2011 01:12:05 +0100 Subject: Alle Mapper angelegt, Script update --- application/models/BootMenuEntriesMapper.php | 36 +++++++++++----------------- 1 file changed, 14 insertions(+), 22 deletions(-) (limited to 'application/models/BootMenuEntriesMapper.php') diff --git a/application/models/BootMenuEntriesMapper.php b/application/models/BootMenuEntriesMapper.php index 576e799..468825e 100644 --- a/application/models/BootMenuEntriesMapper.php +++ b/application/models/BootMenuEntriesMapper.php @@ -1,7 +1,8 @@ _dbTable) { - $this->setDbTable('Application_Model_DbTable_TABLENAME'); + $this->setDbTable('Application_Model_DbTable_Person'); } return $this->_dbTable; } - public function save(Application_Model_TABLENAME $tablenamevar) + public function save(Application_Model_BootMenuEntries $botmenuentries) { - $data = array( - 'bootosID' => $tablenamevar->getBootosID(), - 'bootmenuID' => $tablenamevar->getMenuID(), - 'title' => $tablenamevar->getTitle(), - 'kcl' => $tablenamevar->getKcl(), - 'order' => $tablenamevar->getOrder() - ); + $data = array('bootosID'=> $botmenuentries->getBootosID() ,'bootmenuID'=> $botmenuentries->getBootmenuID() ,'title'=> $botmenuentries->getTitle() ,'kcl'=> $botmenuentries->getKcl() ,'order'=> $botmenuentries->getOrder() ); - if (null === ($id = $tablenamevar->getId()) ) { + if (null === ($id = $botmenuentries->getID()) ) { unset($data['id']); $this->getDbTable()->insert($data); } else { @@ -47,7 +42,7 @@ class Application_Model_BootEntriesMapper } } - public function find($id, Application_Model_TABLENAME $tablenamevar) + public function find($id, Application_Model_BootMenuEntries $botmenuentries) { $result = $this->getDbTable()->find($id); if (0 == count($result)) { @@ -56,10 +51,7 @@ class Application_Model_BootEntriesMapper $row = $result->current(); - $tablenamevar->setId($row->id) - ->setEmail($row->email) - ->setComment($row->comment) - ->setCreated($row->created); + $botmenuentries->setBootosID($row->bootosID)->setBootmenuID($row->bootmenuID)->setTitle($row->title)->setKcl($row->kcl)->setOrder($row->order); } public function fetchAll() @@ -67,17 +59,17 @@ class Application_Model_BootEntriesMapper $resultSet = $this->getDbTable()->fetchAll(); $entries = array(); foreach ($resultSet as $row) { - $entry = new Application_Model_TABLENAME(); - - $entry->setId($row->id) - ->setEmail($row->email) - ->setComment($row->comment) - ->setCreated($row->created); + $entry = new Application_Model_BootMenuEntries(); + $entry->setBootosID($row->bootosID)->setBootmenuID($row->bootmenuID)->setTitle($row->title)->setKcl($row->kcl)->setOrder($row->order); + $entries[] = $entry; } return $entries; } + + + } -- cgit v1.2.3-55-g7522