Ejemplo n.º 1
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);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 3
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);
 }
Ejemplo n.º 4
0
 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);
 }
Ejemplo n.º 6
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);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 8
0
 public function updatePassword($userId, $password)
 {
     $where = [];
     $where[] = 'user_id = ' . $userId;
     $entity = ['password' => $password];
     $success = parent::update($entity, $where, $this->tableName, null);
     return $success;
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 10
0
 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;
     }
 }
Ejemplo n.º 11
0
 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;
 }
Ejemplo n.º 12
0
 public function deleteUuid($uuid)
 {
     $where = ['uuid' => $uuid];
     $result = parent::delete($where, $this->tableName);
     return $result;
 }
Ejemplo n.º 13
0
 public function delete($entity, $where = null, $tableName = null)
 {
     if (!$where) {
         $where = 'module_id = ' . $entity->getId();
     }
     return parent::delete($where, $tableName);
 }
Ejemplo n.º 14
0
 public function persistProjectPpe($projectPpe)
 {
     return parent::insert($projectPpe, null, new projectPpeHydrator());
 }
Ejemplo n.º 15
0
 public function persistProjectSubstance($projectSubstance)
 {
     return parent::insert($projectSubstance, null, new projectSubstanceHydrator());
 }
Ejemplo n.º 16
0
 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();
 }
Ejemplo n.º 18
0
 /**
  * (non-PHPdoc)
  *
  * @see \ZfcBase\Mapper\AbstractDbMapper::getSelect()
  */
 public function getSelect($table = null)
 {
     return parent::getSelect($table);
 }
Ejemplo n.º 19
0
 /**
  * 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);
 }
Ejemplo n.º 20
0
 public function deleteUserProvider($ids)
 {
     return parent::delete(array('(user_id IN (' . $ids . '))'));
 }
Ejemplo n.º 21
0
 /**
  * @todo
  */
 public function persist($passwordModel)
 {
     return parent::insert($passwordModel);
 }
Ejemplo n.º 22
0
 public function deleteThread($id)
 {
     $entity = ['deleted' => "1"];
     $where = ['id = ' . $id];
     parent::update($entity, $where, $this->tableName, null);
 }
Ejemplo n.º 23
0
 public function update(ContactEntity $contact)
 {
     return parent::update($contact, array('id' => $contact->getId()));
 }
Ejemplo n.º 24
0
 public function delete($userId, $postId)
 {
     return parent::delete(array('userId' => $userId, 'postId' => $postId))->getAffectedRows();
 }
Ejemplo n.º 25
0
 protected function insert($entity, $tableName = null, HydratorInterface $hydrator = null)
 {
     $result = parent::insert($entity, $tableName, $hydrator);
     //     $entity->setLogicalDiskId($result->getGeneratedValue());
     return $result;
 }