summaryrefslogtreecommitdiffstats
path: root/application/models
diff options
context:
space:
mode:
Diffstat (limited to 'application/models')
-rw-r--r--application/models/BootMenuEntriesMapper.php25
-rw-r--r--application/models/BootMenuMapper.php13
2 files changed, 32 insertions, 6 deletions
diff --git a/application/models/BootMenuEntriesMapper.php b/application/models/BootMenuEntriesMapper.php
index 4d82c96..466b80b 100644
--- a/application/models/BootMenuEntriesMapper.php
+++ b/application/models/BootMenuEntriesMapper.php
@@ -119,7 +119,7 @@ class Application_Model_BootMenuEntriesMapper
}
}
- public function find($id, Application_Model_BootMenuEntries $botmenuentries)
+ public function find($id, Application_Model_BootMenuEntries $botmenuentries = null)
{
$result = $this->getDbTable()->find($id);
if (0 == count($result)) {
@@ -128,8 +128,27 @@ class Application_Model_BootMenuEntriesMapper
$row = $result->current();
- $botmenuentries->setID($row->bootmenuentriesID)->setBootosID($row->bootosID)->setBootmenuID($row->bootmenuID)->setTitle($row->title)->setConfigID($row->configID)->setKcl($row->kcl)->setKclappend($row->kclappend)->setOrder($row->order);
-
+ if($botmenuentries == null){
+ $botmenuentries = new Application_Model_BootMenuEntries();
+ $botmenuentries->setID($row->bootmenuentriesID)
+ ->setBootosID($row->bootosID)
+ ->setBootmenuID($row->bootmenuID)
+ ->setTitle($row->title)
+ ->setConfigID($row->configID)
+ ->setKcl($row->kcl)
+ ->setKclappend($row->kclappend)
+ ->setOrder($row->order);
+ return $botmenuentries;
+ }else{
+ $botmenuentries->setID($row->bootmenuentriesID)
+ ->setBootosID($row->bootosID)
+ ->setBootmenuID($row->bootmenuID)
+ ->setTitle($row->title)
+ ->setConfigID($row->configID)
+ ->setKcl($row->kcl)
+ ->setKclappend($row->kclappend)
+ ->setOrder($row->order);
+ }
}
public function fetchAll()
diff --git a/application/models/BootMenuMapper.php b/application/models/BootMenuMapper.php
index 60c506d..1043897 100644
--- a/application/models/BootMenuMapper.php
+++ b/application/models/BootMenuMapper.php
@@ -93,16 +93,23 @@ class Application_Model_BootMenuMapper
}
}
- public function find($id, Application_Model_BootMenu $botmenu)
+ public function find($id, Application_Model_BootMenu $botmenu = null)
{
$result = $this->getDbTable()->find($id);
if (0 == count($result)) {
return;
}
-
$row = $result->current();
- $botmenu->setID($row->bootmenuID)->setMembershipID($row->membershipID)->setGroupID($row->groupID)->setTitle($row->title)->setCreated($row->created);
+ if($botmenu == null){
+ $botmenu = new Application_Model_BootMenu();
+ $botmenu->setID($row->bootmenuID)->setMembershipID($row->membershipID)->setGroupID($row->groupID)->setTitle($row->title)->setCreated($row->created);
+ return $botmenu;
+ }else{
+ $botmenu->setID($row->bootmenuID)->setMembershipID($row->membershipID)->setGroupID($row->groupID)->setTitle($row->title)->setCreated($row->created);
+ }
+
+
}
public function fetchAll()