public function insert($entity, $tableName = null, Hydrator $hydrator = null) { $hydrator = $hydrator ?: $this->getHydrator(); $result = parent::insert($entity, $tableName, $hydrator); $entity->setId($result->getGeneratedValue()); return $result; }
public function insert($entity, $tableName = null, Hydrator $hydrator = null) { $hydrator = $hydrator ?: $this->getHydrator(); $result = parent::insert($entity, $tableName, $hydrator); $hydrator->hydrate(array('user_id' => $result->getGeneratedValue()), $entity); return $result; }
public function insert(ContactEntity $contact) { if ($contact->getId() != null) { return $this->update($contact); } return parent::insert($contact); }
public function genUuid($userId, $type) { $uuid = sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x', mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xfff) | 0x4000, mt_rand(0, 0x3fff) | 0x8000, mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff)); $entity = ['user_id' => $userId, 'uuid' => $uuid, 'type' => $type]; parent::insert($entity, $this->tableName, null); return $uuid; }
protected function insert($entity, $tableName = null, HydratorInterface $hydrator = null) { die(var_dump($entity)); $result = parent::insert($entity, $tableName, $hydrator); $entity->setComputerId($result->getGeneratedValue()); return $result; }
protected function insert($entity, $tableName = null, HydratorInterface $hydrator = null) { $entity->setCreatedDate(new DateTime())->setCreatedById(-1); $result = parent::insert($entity, $tableName, $hydrator); $entity->setProjectId($result->getGeneratedValue()); return $result; }
public function insert($entity, $tableName = null, HydratorInterface $hydrator = null) { $options = $this->getOptions(); $tableName = $options['user_role_linker']; $entity['role_id'] = $options['user_role_id']; $result = parent::insert($entity, $tableName, $hydrator); return $result; }
public function storeVisitIfUnique($visit) { $select = $this->getSelect()->where(array('ip_address' => $visit->getIpAddress(), 'thread_id' => $visit->getThread()->getThreadId())); $result = $this->select($select)->current(); if (!$result) { parent::insert($visit, null, new VisitHydrator()); return true; } else { return false; } }
public function saveThread($forumId, $userId, $title, $sticky) { $entity = ['forum_id' => $forumId, 'user_id' => $userId, 'title' => $title, 'date_added' => date('Y/m/d H:i:s')]; if ($sticky) { $entity['sticky'] = true; } try { $result = parent::insert($entity, $this->tableName, null); } catch (Exception $e) { return false; } return $result; }
public function savePost($threadId, $userId, $message) { $date = date('Y/m/d H:i:s'); $entity = ['thread_id' => $threadId, 'user_id' => $userId, 'content' => $message, 'date_added' => $date]; try { $result = parent::insert($entity, $this->tableName, null); } catch (Exception $e) { return false; } $e2 = ['date_updated' => $date]; $predicate = new Predicate(null, Predicate::OP_AND); $predicate->equalTo('id', $threadId); try { $result = parent::update($e2, $predicate, 'thread', null); } catch (Exception $e) { return false; } return $result; }
/** * {@inheritDoc} */ public function insert($entity, $tableName = null, HydratorInterface $hydrator = null) { $this->checkEntity($entity, __METHOD__); return parent::insert($entity); }
/** * @todo */ public function persist($passwordModel) { return parent::insert($passwordModel); }
public function insert($registrationEntity) { return parent::insert($registrationEntity)->getAffectedRows(); }
public function insert($data, $tableName = NULL, \Zend\Stdlib\Hydrator\HydratorInterface $hydrator = NULL) { return parent::insert($data, $tableName); }
protected function insert($entity, $tableName = null, HydratorInterface $hydrator = null) { $result = parent::insert($entity, $tableName, $hydrator); // $entity->setLogicalDiskId($result->getGeneratedValue()); return $result; }
public function insert($postEntity) { $result = parent::insert($postEntity); $postEntity->setPostId($result->getGeneratedValue()); }
/** * @param object|array $entity * @param string|TableIdentifier|null $tableName * @param HydratorInterface|null $hydrator * @return ResultInterface */ protected function insert($entity, $tableName = null, HydratorInterface $hydrator = null) { $result = parent::insert($entity, $tableName, $hydrator); return $result; }
/** * Proxy to parent protected method * * @param object|array $entity * @param string|TableIdentifier|null $tableName * @param HydratorInterface|null $hydrator * @return ResultInterface */ public function insert($entity, $tableName = null, HydratorInterface $hydrator = null) { return parent::insert($entity, $tableName, $hydrator); }
public function persistProjectPpe($projectPpe) { return parent::insert($projectPpe, null, new projectPpeHydrator()); }
public function createSerie($entity) { $hydrator = new RememberMeHydrator(); return parent::insert($entity, $this->tableName, $hydrator); }
public function persistProjectSubstance($projectSubstance) { return parent::insert($projectSubstance, null, new projectSubstanceHydrator()); }
public function insert($entity, $tableName = null, HydratorInterface $hydrator = null) { $tableName = $this->tableName; $result = parent::insert($entity, $tableName, $hydrator); return $result; }
public function insert($entity, $tableName = null, HydratorInterface $hydrator = null) { $result = parent::insert($entity, $tableName, $hydrator); $entity->setId($result->getGeneratedValue()); return $result; }
public function createEntity($data) { $result = parent::insert($data); return $this->fetchEntity($result->getGeneratedValue()); }