/** * * @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; }
public function update($id, $data) { $row = $this->getIfExist($id); Binder::bind($data, $row); $this->_em->flush(); return $row; }