public function save() { $result = $this->repository->save($this); if (empty($this->id)) { $this->setId($result); } }
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); }
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)); }