summaryrefslogtreecommitdiffstats
path: root/application/models
diff options
context:
space:
mode:
authormichael pereira2011-04-18 02:32:00 +0200
committermichael pereira2011-04-18 02:32:00 +0200
commit12692bde37c7793aa9a71433b9ffc575139c9ee1 (patch)
treed458a5a09d52f5cb5be1f38be7410b9d5287fc77 /application/models
parentPbs_Graph bei Minuswerten wird nichts eingefärbt (diff)
downloadpbs2-12692bde37c7793aa9a71433b9ffc575139c9ee1.tar.gz
pbs2-12692bde37c7793aa9a71433b9ffc575139c9ee1.tar.xz
pbs2-12692bde37c7793aa9a71433b9ffc575139c9ee1.zip
Ticket 214 API-Daten zu Bootos hinzugefügt
Diffstat (limited to 'application/models')
-rw-r--r--application/models/BootOs.php60
-rw-r--r--application/models/BootOsMapper.php8
2 files changed, 59 insertions, 9 deletions
diff --git a/application/models/BootOs.php b/application/models/BootOs.php
index bab23db..f098592 100644
--- a/application/models/BootOs.php
+++ b/application/models/BootOs.php
@@ -3,17 +3,22 @@
class Application_Model_BootOs
{
protected $_bootosID;
- protected $_configID;
protected $_groupID;
protected $_membershipID;
protected $_title;
protected $_path_init;
protected $_path_kernel;
+ protected $_path_config;
protected $_defaultkcl;
protected $_created;
protected $_description;
protected $_expires;
protected $_public;
+ protected $_source;
+ protected $_distro;
+ protected $_distroversion;
+ protected $_shortname;
+ protected $_share;
public function __construct(array $options = null)
{
@@ -62,13 +67,13 @@ class Application_Model_BootOs
$this->_bootosID = $_bootosID;
return $this;
}
- public function getConfigID()
+ public function getPath_config()
{
- return $this->_configID;
+ return $this->_path_config;
}
- public function setConfigID($_configID)
+ public function setPath_config($_path_config)
{
- $this->_configID = $_configID;
+ $this->_path_config = $_path_config;
return $this;
}
public function getGroupID()
@@ -161,6 +166,51 @@ class Application_Model_BootOs
$this->_public = $_public;
return $this;
}
+ public function getSource()
+ {
+ return $this->_source;
+ }
+ public function setSource($_source)
+ {
+ $this->_source = $_source;
+ return $this;
+ }
+ public function getDistro()
+ {
+ return $this->_distro;
+ }
+ public function setDistro($_distro)
+ {
+ $this->_distro = $_distro;
+ return $this;
+ }
+ public function getDistroversion()
+ {
+ return $this->_distroversion;
+ }
+ public function setDistroversion($_distroversion)
+ {
+ $this->_distroversion = $_distroversion;
+ return $this;
+ }
+ public function getShortname()
+ {
+ return $this->_shortname;
+ }
+ public function setShortname($_shortname)
+ {
+ $this->_shortname = $_shortname;
+ return $this;
+ }
+ public function getShare()
+ {
+ return $this->_share;
+ }
+ public function setShare($_share)
+ {
+ $this->_share = $_share;
+ return $this;
+ }
/**
* Returns current data as associative array using ReflectionClass
*
diff --git a/application/models/BootOsMapper.php b/application/models/BootOsMapper.php
index 7a4be44..0fb8754 100644
--- a/application/models/BootOsMapper.php
+++ b/application/models/BootOsMapper.php
@@ -73,7 +73,7 @@ class Application_Model_BootOsMapper
public function save(Application_Model_BootOs $botos)
{
- $data = array('bootosID'=> $botos->getID() ,'configID'=> $botos->getConfigID() ,'groupID'=> $botos->getGroupID() ,'title'=> $botos->getTitle(), 'membershipID'=> $botos->getMembershipID() ,'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() );
+ $data = array('bootosID'=> $botos->getID() ,'path_config'=> $botos->getPath_config() ,'groupID'=> $botos->getGroupID() ,'title'=> $botos->getTitle(), 'membershipID'=> $botos->getMembershipID() ,'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(),'source'=> $botos->getSource(),'distro'=> $botos->getDistro(),'distroversion'=> $botos->getDistroversion(),'shortname'=> $botos->getShortname(),'share'=> $botos->getShare() );
if (null === ($id = $botos->getID()) ) {
unset($data['bootosID']);
return $this->getDbTable()->insert($data);
@@ -102,10 +102,10 @@ class Application_Model_BootOsMapper
if($botos == null){
$botos = new Application_Model_BootOs();
- $botos->setID($row->bootosID)->setConfigID($row->configID)->setGroupID($row->groupID)->setMembershipID($row->membershipID)->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);
+ $botos->setID($row->bootosID)->setPath_config($row->path_config)->setGroupID($row->groupID)->setMembershipID($row->membershipID)->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)->setSource($row->source)->setDistro($row->distro)->setDistroversion($row->distroversion)->setShortname($row->shortname)->setShare($row->share);
return $botos;
}else{
- $botos->setID($row->bootosID)->setConfigID($row->configID)->setGroupID($row->groupID)->setMembershipID($row->membershipID)->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);
+ $botos->setID($row->bootosID)->setPath_config($row->path_config)->setGroupID($row->groupID)->setMembershipID($row->membershipID)->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)->setSource($row->source)->setDistro($row->distro)->setDistroversion($row->distroversion)->setShortname($row->shortname)->setShare($row->share);
}
}
@@ -117,7 +117,7 @@ class Application_Model_BootOsMapper
foreach ($resultSet as $row) {
$entry = new Application_Model_BootOs();
- $entry->setID($row->bootosID)->setConfigID($row->configID)->setGroupID($row->groupID)->setMembershipID($row->membershipID)->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);
+ $entry->setID($row->bootosID)->setPath_config($row->path_config)->setGroupID($row->groupID)->setMembershipID($row->membershipID)->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)->setSource($row->source)->setDistro($row->distro)->setDistroversion($row->distroversion)->setShortname($row->shortname)->setShare($row->share);
$entries[$row->bootosID] = $entry;
}