diff options
author | michael pereira | 2011-04-20 18:35:39 +0200 |
---|---|---|
committer | michael pereira | 2011-04-20 18:35:39 +0200 |
commit | 3df435742ef6d814f411ab9f4d405cc06eba1dab (patch) | |
tree | 48e047451ac032fe8f61e700ea530d0eb7936f0f /application/models | |
parent | Resource Controller fix (diff) | |
download | pbs2-3df435742ef6d814f411ab9f4d405cc06eba1dab.tar.gz pbs2-3df435742ef6d814f411ab9f4d405cc06eba1dab.tar.xz pbs2-3df435742ef6d814f411ab9f4d405cc06eba1dab.zip |
API + Fixes
Diffstat (limited to 'application/models')
-rw-r--r-- | application/models/PreBoot.php | 22 | ||||
-rw-r--r-- | application/models/PreBootMapper.php | 8 |
2 files changed, 26 insertions, 4 deletions
diff --git a/application/models/PreBoot.php b/application/models/PreBoot.php index c8d0b43..57a622d 100644 --- a/application/models/PreBoot.php +++ b/application/models/PreBoot.php @@ -17,6 +17,8 @@ class Application_Model_PreBoot protected $_path_preboot; protected $_membershipID; protected $_groupID; + protected $_source; + protected $_created; public function __construct(array $options = null) @@ -106,6 +108,26 @@ class Application_Model_PreBoot $this->_path_preboot = $_path_preboot; return $this; } + public function getCreated() + { + return $this->_created; + } + + public function setCreated($_created) + { + $this->_created = $_created; + return $this; + } + public function getSource() + { + return $this->_source; + } + + public function setSource($_source) + { + $this->_source = $_source; + return $this; + } /** * Returns current data as associative array using ReflectionClass diff --git a/application/models/PreBootMapper.php b/application/models/PreBootMapper.php index 7d59142..564fd49 100644 --- a/application/models/PreBootMapper.php +++ b/application/models/PreBootMapper.php @@ -86,7 +86,7 @@ class Application_Model_PreBootMapper public function save(Application_Model_PreBoot $preboot) { - $data = array('prebootID'=> $preboot->getID() ,'membershipID'=> $preboot->getMembershipID() ,'title'=> $preboot->getTitle() ,'path_preboot'=> $preboot->getPath_preboot() ,'groupID'=> $preboot->getGroupID() ); + $data = array('prebootID'=> $preboot->getID() ,'membershipID'=> $preboot->getMembershipID() ,'title'=> $preboot->getTitle() ,'path_preboot'=> $preboot->getPath_preboot() ,'groupID'=> $preboot->getGroupID(), 'created' => $preboot->getCreated(), 'source' => $preboot->getSource() ); if (null === ($id = $preboot->getID()) ) { unset($data['prebootID']); @@ -117,10 +117,10 @@ class Application_Model_PreBootMapper if($preboot == null){ $preboot = new Application_Model_PreBoot(); - $preboot->setID($row->prebootID)->setMembershipID($row->membershipID)->setTitle($row->title)->setPath_preboot($row->path_preboot)->setGroupID($row->groupID); + $preboot->setID($row->prebootID)->setMembershipID($row->membershipID)->setTitle($row->title)->setPath_preboot($row->path_preboot)->setGroupID($row->groupID)->setSource($row->source)->setCreated($row->created); return $preboot; }else{ - $preboot->setID($row->prebootID)->setMembershipID($row->membershipID)->setTitle($row->title)->setPath_preboot($row->path_preboot)->setGroupID($row->groupID); + $preboot->setID($row->prebootID)->setMembershipID($row->membershipID)->setTitle($row->title)->setPath_preboot($row->path_preboot)->setGroupID($row->groupID)->setSource($row->source)->setCreated($row->created); } } @@ -131,7 +131,7 @@ class Application_Model_PreBootMapper foreach ($resultSet as $row) { $entry = new Application_Model_PreBoot(); - $entry->setID($row->prebootID)->setMembershipID($row->membershipID)->setTitle($row->title)->setPath_preboot($row->path_preboot)->setGroupID($row->groupID); + $entry->setID($row->prebootID)->setMembershipID($row->membershipID)->setTitle($row->title)->setPath_preboot($row->path_preboot)->setGroupID($row->groupID)->setSource($row->source)->setCreated($row->created); $entries[] = $entry; } |