Beispiel #1
0
 /**
  * 
  * @param array $data of Model
  * @return integer
  */
 public function create(array $data)
 {
     $ent = Binder::bind($data, new static::$_stickClass());
     $this->_em->persist($ent);
     $this->_em->flush();
     return $ent;
 }
Beispiel #2
0
 public function update($id, $data)
 {
     $row = $this->getIfExist($id);
     Binder::bind($data, $row);
     $this->_em->flush();
     return $row;
 }