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 update($entity, $where = null, $tableName = null, HydratorInterface $hydrator = null) { if (!$where) { $where = 'id = ' . $entity->getId(); } return parent::update($entity, $where, $tableName, $hydrator); }
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 updatePassword($userId, $password) { $where = []; $where[] = 'user_id = ' . $userId; $entity = ['password' => $password]; $success = parent::update($entity, $where, $this->tableName, null); return $success; }
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); }
/** * {@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) { $entity->setModifiedDate(new DateTime()); if (!$where) { $where = 'project_id = ' . $entity->getProjectId(); } return parent::update($entity, $where, $tableName, $hydrator); }
public function updateSerie($entity) { $where = new Where(); $where->equalTo('user_id', $entity->getUserId()); $where->equalTo('sid', $entity->getSid()); $hydrator = new RememberMeHydrator(); return parent::update($entity, $where, $this->tableName, $hydrator); }
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 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 update(ContactEntity $contact) { return parent::update($contact, array('id' => $contact->getId())); }
public function update($postEntity) { return parent::update($postEntity, array('userId' => $postEntity->getUserId(), 'postId' => $postEntity->getPostId()))->getAffectedRows(); }
public function deleteThread($id) { $entity = ['deleted' => "1"]; $where = ['id = ' . $id]; parent::update($entity, $where, $this->tableName, null); }