コード例 #1
0
ファイル: AbstractService.php プロジェクト: rockmarquim/zf2
 public function update(array $data)
 {
     $entity = $this->em->getReference($this->entity, $data['id']);
     $entity = Configurator::configure($entity, $data);
     $this->em->persist($entity);
     $this->em->flush();
     return $entity;
 }
コード例 #2
0
ファイル: User.php プロジェクト: roomoraaes/zend
 public function update(array $data)
 {
     $entity = $this->em->getReference($this->entity, $data['id']);
     if (empty($data['password'])) {
         unset($data['password']);
     }
     $entity = Configurator::configure($entity, $data);
     $this->em->persist($entity);
     $this->em->flush();
 }
コード例 #3
0
ファイル: Livro.php プロジェクト: rockmarquim/zf2
 public function update(array $data)
 {
     $entity = $this->em->getReference($this->entity, $data['id']);
     $entity = Configurator::configure($entity, $data);
     $categoria = $this->em->getReference("Livraria\\Entity\\Categoria", $data['categoria']);
     $entity->setCategoria($categoria);
     $this->em->persist($entity);
     $this->em->flush();
     return $entity;
 }
コード例 #4
0
ファイル: Livro.php プロジェクト: rockmarquim/zf2
 public function __construct($options = null)
 {
     Configurator::configure($this, $options);
 }
コード例 #5
0
ファイル: User.php プロジェクト: rockmarquim/zf2
 public function __construct($options = null)
 {
     Configurator::configure($this, $options);
     $this->salt = base_convert(sha1(uniqid(mt_rand(), true)), 16, 36);
 }
コード例 #6
0
ファイル: Categoria.php プロジェクト: glaucosydow/curso-zf2
 public function __construct($options = null)
 {
     Configurator::configure($this, $options);
     $this->livros = new ArrayCollection();
 }