Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function save(){
- $dbTable = $this->getMapper()->getDbTable();
- if ($row = $dbTable->find($this->id)) {
- foreach ($this->_data as $key => $value) {
- $row->$key = $value;
- }
- $row->save();
- } else {
- $dbTable->insert($this->_data);
- }
- }
Add Comment
Please, Sign In to add comment