Exemplo n.º 1
0
 public function save()
 {
     $result = $this->repository->save($this);
     if (empty($this->id)) {
         $this->setId($result);
     }
 }
Exemplo n.º 2
0
 protected function __construct()
 {
     parent::__construct();
 }
 public function __construct(\Doctrine\ORM\EntityManager $em, \Doctrine\ORM\Mapping\ClassMetadata $class)
 {
     parent::__construct($em, $class);
     $this->initializeTreeRepository($em, $class);
 }
Exemplo n.º 4
0
 public function __construct(\Silex\Application $app)
 {
     $this->passwordEncoder = $app['security.encoder_factory']->getEncoder(new $this->userClass());
     parent::__construct($app['orm.em'], $app['orm.em']->getClassMetadata($this->userClass));
 }