Example #1
0
 /**
  * Update object
  *
  * @param StorableInterface $obj
  * @param string            $type
  *
  * @return void
  */
 protected function update(StorableInterface $obj, $type)
 {
     $qb = $this->con->createQueryBuilder()->update($this->tables[$type])->where('id = :id')->setParameter('id', $obj->getId(), \PDO::PARAM_INT);
     foreach ($obj->getStorableData() as $name => $value) {
         $qb->set($name, $this->con->quote($value));
     }
     return $qb->execute();
 }