From 28f45e155a12db3b27682e84896b3f6a6b1c794a Mon Sep 17 00:00:00 2001 From: Simon Date: Fri, 25 Mar 2011 17:51:50 +0100 Subject: Nicht Benötigte Tabellen, Models, Mapper und Dateien entfernt --- application/models/PoolFiltersMapper.php | 98 -------------------------------- 1 file changed, 98 deletions(-) delete mode 100644 application/models/PoolFiltersMapper.php (limited to 'application/models/PoolFiltersMapper.php') diff --git a/application/models/PoolFiltersMapper.php b/application/models/PoolFiltersMapper.php deleted file mode 100644 index 7cc20bb..0000000 --- a/application/models/PoolFiltersMapper.php +++ /dev/null @@ -1,98 +0,0 @@ -getDbTable()->select() - ->from($this->_dbTable) - ->where($criteria . ' = ?', $value); - $stmt = $select->query(); - $result = $stmt->fetchAll(); - return $result; - }catch (Zend_Exception $e) { - echo "Error message 2: " . $e->getMessage() . "\n"; - } - } - - 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_PoolFilters'); - } - - return $this->_dbTable; - } - - public function save(Application_Model_PoolFilters $polfilters) - { - - $data = array('poolID'=> $polfilters->getPoolID() ,'filterID'=> $polfilters->getFilterID() ); - - if (null === ($id = $polfilters->getID()) ) { - unset($data['polfiltersID']); - $this->getDbTable()->insert($data); - } else { - $this->getDbTable()->update($data, array('polfiltersID = ?' => $id)); - } - } - - public function delete(Application_Model_PoolFilters $polfilters) - { - if (null === ($id = $polfilters->getID()) ) { - return; - } else { - $this->getDbTable()->delete(array('polfiltersID = ?' => $id)); - } - } - - public function find($id, Application_Model_PoolFilters $polfilters) - { - $result = $this->getDbTable()->find($id); - if (0 == count($result)) { - return; - } - - $row = $result->current(); - - $polfilters->setPoolID($row->poolID)->setFilterID($row->filterID); - } - - public function fetchAll() - { - $resultSet = $this->getDbTable()->fetchAll(); - $entries = array(); - foreach ($resultSet as $row) { - $entry = new Application_Model_PoolFilters(); - - $entry->setPoolID($row->poolID)->setFilterID($row->filterID); - - $entries[] = $entry; - } - return $entries; - } - - - -} - -- cgit v1.2.3-55-g7522