Esempio n. 1
0
 public function save(Gyuser_Model_Plans $Plans)
 {
     $data = array('payments_qty' => $Plans->getPayments_qty(), 'recurrence' => $Plans->getRecurrence());
     if (null === ($id = $Plans->getId())) {
         unset($data['id']);
         $id = $this->getDbTable()->insert($data);
         return $id;
     } else {
         unset($data['operation_id']);
         $id = $this->getDbTable()->update($data, array('id = ?' => $id));
         return $id;
     }
 }