diff options
| author | Simon | 2011-03-05 13:28:13 +0100 |
|---|---|---|
| committer | Simon | 2011-03-05 13:28:13 +0100 |
| commit | 648f1ac9a60705a5a8ce0c6021657d9060cd45aa (patch) | |
| tree | a9b221cb64ccdd1583dc0991369473a9347a7421 /application/models | |
| parent | filterentriesmapper fürs löschen einzelner datensätze vorbereiten (diff) | |
| parent | .zfproject fix (diff) | |
| download | pbs2-648f1ac9a60705a5a8ce0c6021657d9060cd45aa.tar.gz pbs2-648f1ac9a60705a5a8ce0c6021657d9060cd45aa.tar.xz pbs2-648f1ac9a60705a5a8ce0c6021657d9060cd45aa.zip | |
Merge branch 'master' of openslx.org:lsfks/master-teamprojekt/pbs2
Diffstat (limited to 'application/models')
| -rw-r--r-- | application/models/BootOs.php | 14 | ||||
| -rw-r--r-- | application/models/BootOsMapper.php | 14 |
2 files changed, 15 insertions, 13 deletions
diff --git a/application/models/BootOs.php b/application/models/BootOs.php index 57d1423..a2eea2f 100644 --- a/application/models/BootOs.php +++ b/application/models/BootOs.php @@ -2,11 +2,15 @@ class Application_Model_BootOs { - protected $_bootisoID; - protected $_membershipID; + protected $_bootosID; + protected $_configID; protected $_groupID; - protected $_serialnumber; + protected $_title; + protected $_path_init; + protected $_path_kernel; + protected $_defaultkcl; protected $_created; + protected $_description; protected $_expires; protected $_public; @@ -48,11 +52,11 @@ class Application_Model_BootOs } - public function getBootosID() + public function getID() { return $this->_bootosID; } - public function setBootosID($_bootosID) + public function setID($_bootosID) { $this->_bootosID = $_bootosID; return $this; diff --git a/application/models/BootOsMapper.php b/application/models/BootOsMapper.php index 0c5d30f..9807911 100644 --- a/application/models/BootOsMapper.php +++ b/application/models/BootOsMapper.php @@ -31,14 +31,12 @@ class Application_Model_BootOsMapper public function save(Application_Model_BootOs $botos) { - - $data = array('bootisoID'=> $botos->getBootisoID() ,'membershipID'=> $botos->getMembershipID() ,'groupID'=> $botos->getGroupID() ,'serialnumber'=> $botos->getSerialnumber() ,'created'=> $botos->getCreated() ,'expires'=> $botos->getExpires() ,'public'=> $botos->getPublic() ); - + $data = array('bootosID'=> $botos->getID() ,'configID'=> $botos->getConfigID() ,'groupID'=> $botos->getGroupID() ,'title'=> $botos->getTitle() ,'path_init'=> $botos->getPath_init() ,'path_kernel'=> $botos->getPath_kernel() ,'defaultkcl'=> $botos->getDefaultkcl() ,'created'=> $botos->getCreated() ,'description'=> $botos->getDescription() ,'expires'=> $botos->getExpires() ,'public'=> $botos->getPublic() ); if (null === ($id = $botos->getID()) ) { - unset($data['botosID']); + unset($data['bootosID']); $this->getDbTable()->insert($data); } else { - $this->getDbTable()->update($data, array('botosID = ?' => $id)); + $this->getDbTable()->update($data, array('bootosID = ?' => $id)); } } @@ -47,7 +45,7 @@ class Application_Model_BootOsMapper if (null === ($id = $botos->getID()) ) { return; } else { - $this->getDbTable()->delete(array('botosID = ?' => $id)); + $this->getDbTable()->delete(array('bootosID = ?' => $id)); } } @@ -60,7 +58,7 @@ class Application_Model_BootOsMapper $row = $result->current(); - $botos->setBootisoID($row->bootisoID)->setMembershipID($row->membershipID)->setGroupID($row->groupID)->setSerialnumber($row->serialnumber)->setCreated($row->created)->setExpires($row->expires)->setPublic($row->public); + $botos->setID($row->bootosID)->setConfigID($row->configID)->setGroupID($row->groupID)->setTitle($row->title)->setPath_init($row->path_init)->setPath_kernel($row->path_kernel)->setDefaultkcl($row->defaultkcl)->setCreated($row->created)->setDescription($row->description)->setExpires($row->expires)->setPublic($row->public); } public function fetchAll() @@ -70,7 +68,7 @@ class Application_Model_BootOsMapper foreach ($resultSet as $row) { $entry = new Application_Model_BootOs(); - $entry->setBootisoID($row->bootisoID)->setMembershipID($row->membershipID)->setGroupID($row->groupID)->setSerialnumber($row->serialnumber)->setCreated($row->created)->setExpires($row->expires)->setPublic($row->public); + $entry->setID($row->bootosID)->setConfigID($row->configID)->setGroupID($row->groupID)->setTitle($row->title)->setPath_init($row->path_init)->setPath_kernel($row->path_kernel)->setDefaultkcl($row->defaultkcl)->setCreated($row->created)->setDescription($row->description)->setExpires($row->expires)->setPublic($row->public); $entries[] = $entry; } |
