summaryrefslogtreecommitdiffstats
path: root/application/models/BootMapper.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/models/BootMapper.php')
-rw-r--r--application/models/BootMapper.php83
1 files changed, 0 insertions, 83 deletions
diff --git a/application/models/BootMapper.php b/application/models/BootMapper.php
deleted file mode 100644
index 43f9d3d..0000000
--- a/application/models/BootMapper.php
+++ /dev/null
@@ -1,83 +0,0 @@
-<?php
-
-class Application_Model_BootMapper
-{
-
- protected $_dbTable;
-
- public function setDbTable($dbTable)
- {
- if (is_string($dbTable)) {
- $dbTable = new $dbTable();
- }
-
- if (!$dbTable instanceof Zend_Db_Table_Abstract) {
- throw new Exception('Invalid table data gateway provided');
- }
-
- $this->_dbTable = $dbTable;
-
- return $this;
- }
-
- public function getDbTable()
- {
- if (null === $this->_dbTable) {
- $this->setDbTable('Application_Model_DbTable_Boot');
- }
-
- return $this->_dbTable;
- }
-
- public function save(Application_Model_Boot $bot)
- {
-
- $data = array();
-
- if (null === ($id = $bot->getID()) ) {
- unset($data['botID']);
- $this->getDbTable()->insert($data);
- } else {
- $this->getDbTable()->update($data, array('botID = ?' => $id));
- }
- }
-
- public function delete(Application_Model_Boot $bot)
- {
- if (null === ($id = $bot->getID()) ) {
- return;
- } else {
- $this->getDbTable()->delete(array('botID = ?' => $id));
- }
- }
-
- public function find($id, Application_Model_Boot $bot)
- {
- $result = $this->getDbTable()->find($id);
- if (0 == count($result)) {
- return;
- }
-
- $row = $result->current();
-
- $bot;
- }
-
- public function fetchAll()
- {
- $resultSet = $this->getDbTable()->fetchAll();
- $entries = array();
- foreach ($resultSet as $row) {
- $entry = new Application_Model_Boot();
-
- $entry;
-
- $entries[] = $entry;
- }
- return $entries;
- }
-
-
-
-}
-