public function update($entity, $where = null, $tableName = null, HydratorInterface $hydrator = null) { if (!$where) { $where = array('user_id' => $entity->getId()); } return parent::update($entity, $where, $tableName, $hydrator); }
public function update($entity, $where = null, $tableName = null, HydratorInterface $hydrator = null) { if (!$where) { $where = 'id = ' . $entity->getId(); } return parent::update($entity, $where, $tableName, $hydrator); }
protected function update($entity, $where = null, $tableName = null, HydratorInterface $hydrator = null) { if (!$where) { $where = 'method_id = ' . $entity->getMethodId(); } return parent::update($entity, $where, $tableName, $hydrator); }
public function removeSerie($userId, $serieId) { $where = new Where(); $where->equalTo('user_id', $userId); $where->equalTo('sid', $serieId); return parent::delete($where, $this->tableName); }
/** * {@inheritDoc} */ public function update($entity, $where = null, $tableName = null, HydratorInterface $hydrator = null) { $this->checkEntity($entity, __METHOD__); if (!$where) { $where = array('user_id' => $entity->getUser()->getId()); } return parent::update($entity, $where); }
protected function update($entity, $where = null, $tableName = null, HydratorInterface $hydrator = null) { if (!$where) { $where = 'computer_id = ' . $entity->getComputerId(); } $entity->setModified(new \DateTime()); return parent::update($entity, $where, $tableName, $hydrator); }
protected function update($entity, $where = null, $tableName = null, HydratorInterface $hydrator = null) { $entity->setModifiedDate(new DateTime()); if (!$where) { $where = 'project_id = ' . $entity->getProjectId(); } return parent::update($entity, $where, $tableName, $hydrator); }
public function updatePassword($userId, $password) { $where = []; $where[] = 'user_id = ' . $userId; $entity = ['password' => $password]; $success = parent::update($entity, $where, $this->tableName, null); return $success; }
public function updateEntity($id, $data) { if (is_object($data)) { $data = (array) $data; } if (!empty($data)) { $result = parent::update($data, array('id' => $id)); } return $this->fetch($id); }
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 updatePost($postId, $content) { $entity = ['content' => $content, 'last_updated' => date('Y/m/d H:i:s')]; $predicate = new Predicate(null, Predicate::OP_AND); $predicate->equalTo('id', $postId); try { $result = parent::update($entity, $predicate, $this->tableName, null); } catch (Exception $e) { return false; } return true; }
public function deleteUuid($uuid) { $where = ['uuid' => $uuid]; $result = parent::delete($where, $this->tableName); return $result; }
public function delete($entity, $where = null, $tableName = null) { if (!$where) { $where = 'module_id = ' . $entity->getId(); } return parent::delete($where, $tableName); }
public function persistProjectPpe($projectPpe) { return parent::insert($projectPpe, null, new projectPpeHydrator()); }
public function persistProjectSubstance($projectSubstance) { return parent::insert($projectSubstance, null, new projectSubstanceHydrator()); }
public function insert($data, $tableName = NULL, \Zend\Stdlib\Hydrator\HydratorInterface $hydrator = NULL) { return parent::insert($data, $tableName); }
public function insert($registrationEntity) { return parent::insert($registrationEntity)->getAffectedRows(); }
/** * (non-PHPdoc) * * @see \ZfcBase\Mapper\AbstractDbMapper::getSelect() */ public function getSelect($table = null) { return parent::getSelect($table); }
/** * 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 deleteUserProvider($ids) { return parent::delete(array('(user_id IN (' . $ids . '))')); }
/** * @todo */ public function persist($passwordModel) { return parent::insert($passwordModel); }
public function deleteThread($id) { $entity = ['deleted' => "1"]; $where = ['id = ' . $id]; parent::update($entity, $where, $this->tableName, null); }
public function update(ContactEntity $contact) { return parent::update($contact, array('id' => $contact->getId())); }
public function delete($userId, $postId) { return parent::delete(array('userId' => $userId, 'postId' => $postId))->getAffectedRows(); }
protected function insert($entity, $tableName = null, HydratorInterface $hydrator = null) { $result = parent::insert($entity, $tableName, $hydrator); // $entity->setLogicalDiskId($result->getGeneratedValue()); return $result; }