Example #1
0
 public function save(Gyuser_Model_Events $Events)
 {
     $data = array('operation_id' => $Events->getOperation_id(), 'type_id' => $Events->getType_id(), 'action_id' => $Events->getAction_id(), 'schedule' => $Events->getSchedule(), 'assigned_operator_id' => $Events->getAssigned_operator_id(), 'comments' => $Events->getComments());
     if (null === ($id = $Events->getId())) {
         unset($data['id']);
         $id = $this->getDbTable()->insert($data);
         return $id;
     } else {
         $id = $this->getDbTable()->update($data, array('id = ?' => $id));
         return $id;
     }
 }