public function __construct(EntityManager $manager) { $this->manager = $manager; $this->uow = $manager->getUnitOfWork(); $proxyGenerator = new ProxyGenerator($this->manager->getConfiguration()->getProxyDir(), $this->manager->getConfiguration()->getProxyNamespace()); parent::__construct($proxyGenerator, $this->manager->getMetadataFactory(), $this->manager->getConfiguration()->isAutogenerateProxies()); }
/** * Initializes a new instance of the <tt>ProxyFactory</tt> class that is * connected to the given <tt>DocumentManager</tt>. * * @param DocumentManager $manager * @param string $proxyDir The directory to use for the proxy classes. It * must exist. * @param string $proxyNamespace The namespace to use for the proxy classes. * @param int $autoGenerate Whether to automatically generate proxy classes. */ public function __construct(DocumentManager $manager, $proxyDir, $proxyNamespace, $autoGenerate = AbstractProxyFactory::AUTOGENERATE_NEVER) { $this->metadataFactory = $manager->getMetadataFactory(); $this->uow = $manager->getUnitOfWork(); $this->proxyNamespace = $proxyNamespace; $proxyGenerator = new ProxyGenerator($proxyDir, $proxyNamespace); $proxyGenerator->setPlaceholder('baseProxyInterface', 'Doctrine\\ODM\\OrientDB\\Proxy\\Proxy'); parent::__construct($proxyGenerator, $this->metadataFactory, $autoGenerate); }
/** * Initializes a new instance of the <tt>ProxyFactory</tt> class that is * connected to the given <tt>EntityManager</tt>. * * @param \Doctrine\ORM\EntityManager $em The EntityManager the new factory works for. * @param string $proxyDir The directory to use for the proxy classes. It must exist. * @param string $proxyNs The namespace to use for the proxy classes. * @param boolean $autoGenerate Whether to automatically generate proxy classes. */ public function __construct(EntityManager $em, $proxyDir, $proxyNs, $autoGenerate = false) { $proxyGenerator = new ProxyGenerator($proxyDir, $proxyNs); $proxyGenerator->setPlaceholder('baseProxyInterface', 'Doctrine\\ORM\\Proxy\\Proxy'); parent::__construct($proxyGenerator, $em->getMetadataFactory(), $autoGenerate); $this->em = $em; $this->uow = $em->getUnitOfWork(); $this->proxyNs = $proxyNs; }
/** * * @param EntityManagerInterface $em * @param string $proxyDirectory * @param string $proxyNamespace * @param bool $autoGenerate */ public function __construct(EntityManagerInterface $em, $proxyDirectory, $proxyNamespace, $autoGenerate = true) { $proxyGenerator = new ProxyGenerator($proxyDirectory, $proxyNamespace); $proxyGenerator->setPlaceholder('baseProxyInterface', 'Pasinter\\OHM\\Proxy\\ProxyInterface'); parent::__construct($proxyGenerator, $em->getMetadataFactory(), $autoGenerate); $this->em = $em; $this->proxyDirectory = $proxyDirectory; $this->proxyNamespace = $proxyNamespace; }
/** * Initializes a new instance of the <tt>ProxyFactory</tt> class that is * connected to the given <tt>DocumentManager</tt>. * * @param \Doctrine\ODM\MongoDB\DocumentManager $documentManager The DocumentManager the new factory works for. * @param string $proxyDir The directory to use for the proxy classes. It * must exist. * @param string $proxyNamespace The namespace to use for the proxy classes. * @param integer $autoGenerate Whether to automatically generate proxy classes. */ public function __construct(DocumentManager $documentManager, $proxyDir, $proxyNamespace, $autoGenerate = AbstractProxyFactory::AUTOGENERATE_NEVER) { $this->metadataFactory = $documentManager->getMetadataFactory(); $this->uow = $documentManager->getUnitOfWork(); $this->proxyNamespace = $proxyNamespace; $this->lifecycleEventManager = new LifecycleEventManager($documentManager, $this->uow, $documentManager->getEventManager()); $proxyGenerator = new ProxyGenerator($proxyDir, $proxyNamespace); $proxyGenerator->setPlaceholder('baseProxyInterface', Proxy::class); parent::__construct($proxyGenerator, $this->metadataFactory, $autoGenerate); }
/** * Initializes a new instance of the <tt>ProxyFactory</tt> class that is * connected to the given <tt>EntityManager</tt>. * * @param EntityManagerInterface $em The EntityManager the new factory works for. * @param string $proxyDir The directory to use for the proxy classes. It must exist. * @param string $proxyNs The namespace to use for the proxy classes. * @param boolean|int $autoGenerate The strategy for automatically generating proxy classes. Possible * values are constants of Doctrine\Common\Proxy\AbstractProxyFactory. */ public function __construct(EntityManagerInterface $em, $proxyDir, $proxyNs, $autoGenerate = AbstractProxyFactory::AUTOGENERATE_NEVER) { $proxyGenerator = new ProxyGenerator($proxyDir, $proxyNs); $proxyGenerator->setPlaceholder('baseProxyInterface', 'Doctrine\\ORM\\Proxy\\Proxy'); parent::__construct($proxyGenerator, $em->getMetadataFactory(), $autoGenerate); $this->em = $em; $this->uow = $em->getUnitOfWork(); $this->proxyNs = $proxyNs; $this->identifierFlattener = new IdentifierFlattener($this->uow, $em->getMetadataFactory()); }
/** * Initializes a new instance of the <tt>ProxyFactory</tt> class that is * connected to the given <tt>DocumentManager</tt>. * * @param DocumentManager $documentManager The DocumentManager the new factory works for. * @param string $proxyDir The directory to use for the proxy classes. It must exist. * @param string $proxyNamespace The namespace to use for the proxy classes. * @param boolean $autoGenerate Whether to automatically generate proxy classes. */ public function __construct(DocumentManager $documentManager, $proxyDir, $proxyNamespace, $autoGenerate = false) { parent::__construct(new ProxyGenerator($proxyDir, $proxyNamespace), $documentManager->getMetadataFactory(), $autoGenerate); $this->documentManager = $documentManager; $this->proxyNamespace = $proxyNamespace; }