예제 #1
0
 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);
 }
예제 #2
0
 public function update($entity, $where = null, $tableName = null, HydratorInterface $hydrator = null)
 {
     if (!$where) {
         $where = 'id = ' . $entity->getId();
     }
     return parent::update($entity, $where, $tableName, $hydrator);
 }
예제 #3
0
 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);
 }
예제 #4
0
파일: User.php 프로젝트: galaco/chatter
 public function updatePassword($userId, $password)
 {
     $where = [];
     $where[] = 'user_id = ' . $userId;
     $entity = ['password' => $password];
     $success = parent::update($entity, $where, $this->tableName, null);
     return $success;
 }
예제 #5
0
 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);
 }
예제 #7
0
 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);
 }
예제 #8
0
 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);
 }
예제 #9
0
 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);
 }
예제 #10
0
파일: Post.php 프로젝트: galaco/chatter
 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;
 }
예제 #11
0
 public function update(ContactEntity $contact)
 {
     return parent::update($contact, array('id' => $contact->getId()));
 }
예제 #12
0
 public function update($postEntity)
 {
     return parent::update($postEntity, array('userId' => $postEntity->getUserId(), 'postId' => $postEntity->getPostId()))->getAffectedRows();
 }
예제 #13
0
파일: Thread.php 프로젝트: galaco/chatter
 public function deleteThread($id)
 {
     $entity = ['deleted' => "1"];
     $where = ['id = ' . $id];
     parent::update($entity, $where, $this->tableName, null);
 }