コード例 #1
0
ファイル: Bean.php プロジェクト: ram600/vasabi
 /**
  * 
  * @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;
 }
コード例 #2
0
ファイル: Stickers.php プロジェクト: ram600/vasabi
 public function update($id, $data)
 {
     $row = $this->getIfExist($id);
     Binder::bind($data, $row);
     $this->_em->flush();
     return $row;
 }