summaryrefslogtreecommitdiffstats
path: root/application/models/BootIsoMapper.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/models/BootIsoMapper.php')
-rw-r--r--application/models/BootIsoMapper.php19
1 files changed, 11 insertions, 8 deletions
diff --git a/application/models/BootIsoMapper.php b/application/models/BootIsoMapper.php
index 52849b2..c8c4b41 100644
--- a/application/models/BootIsoMapper.php
+++ b/application/models/BootIsoMapper.php
@@ -5,7 +5,7 @@ class Application_Model_BootIsoMapper
protected $_dbTable;
- public function findBy($criteria, $value)
+ public function findBy($criteria, $value, $array=false)
{
try{
$db = Zend_Db_Table::getDefaultAdapter();
@@ -15,14 +15,17 @@ class Application_Model_BootIsoMapper
$stmt = $select->query();
$result = $stmt->fetchAll();
- $entries = array();
- foreach ($result as $row) {
- $entry = new Application_Model_BootIso($row);
- $entry->setID($row['bootisoID']);
- $entries[] = $entry;
+ if(!$array){
+ $entries = array();
+ foreach ($result as $row) {
+ $entry = new Application_Model_BootIso($row);
+ $entry->setID($row['bootisoID']);
+ $entries[] = $entry;
+ }
+ return $entries;
+ }else{
+ return $result;
}
-
- return $entries;
}catch (Zend_Exception $e) {
echo "Error message 2: " . $e->getMessage() . "\n";