Doctrine\ODM\OrientDB\Manager::getUnitOfWork PHP Метод

getUnitOfWork() публичный Метод

public getUnitOfWork ( )
    public function getUnitOfWork()
    {
        return $this->uow;
    }

Usage Example

Пример #1
0
 /**
  * Initializes a new instance of the <tt>ProxyFactory</tt> class that is
  * connected to the given <tt>DocumentManager</tt>.
  *
  * @param \Doctrine\ODM\OrientDB\Manager $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(Manager $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);
 }