示例#1
0
 public function saveLocal(GLocal $local)
 {
     if ($local->status == null) {
         $local->status = GLocalTable::DEFAULT_LOCAL_STATUS;
     }
     if ($local->lid == 0) {
         $this->tableGateway->insert($local->getFullData());
     } else {
         if ($this->getLocal($local->lid)) {
             $this->tableGateway->update($local->getFullData(), array('LID' => $local->lid));
         } else {
             //throw new \Exception('Form id does not exist');
             return null;
         }
     }
 }