Beispiel #1
0
 protected function doInsert(\woo\domain\DomainObject $object)
 {
     $space = $object->getSpace();
     if (!$space) {
         throw new \woo\base\AppException("cannot save without space");
     }
     $values = array($object->getstart(), $object->getduration(), $space->getId(), $object->getname());
     $this->insertStmt->execute($values);
 }
Beispiel #2
0
 function newUpdate(\woo\domain\DomainObject $obj)
 {
     // not type checking removed
     $id = $obj->getId();
     $cond = null;
     $values['name'] = $obj->getName();
     $values['space'] = $obj->getSpace()->getId();
     if ($id > -1) {
         $cond['id'] = $id;
     }
     return $this->buildStatement("event", $values, $cond);
 }