Пример #1
0
 /**
  * Creates a new factory instance that uses the given DocumentManager instance.
  *
  * @param DocumentManagerInterface $dm The DocumentManager instance
  */
 public function __construct(DocumentManagerInterface $dm)
 {
     $this->dm = $dm;
     $conf = $this->dm->getConfiguration();
     $this->setCacheDriver($conf->getMetadataCacheImpl());
     $this->driver = $conf->getMetadataDriverImpl();
     $this->evm = $this->dm->getEventManager();
 }
Пример #2
0
 /**
  * @param DocumentManagerInterface $dm
  */
 public function __construct(DocumentManagerInterface $dm)
 {
     $this->dm = $dm;
     $this->session = $dm->getPhpcrSession();
     $this->eventListenersInvoker = new ListenersInvoker($dm);
     $this->eventManager = $dm->getEventManager();
     $config = $dm->getConfiguration();
     $this->documentClassMapper = $config->getDocumentClassMapper();
     $this->validateDocumentName = $config->getValidateDoctrineMetadata();
     $this->writeMetadata = $config->getWriteDoctrineMetadata();
     $this->uuidGenerator = $config->getUuidGenerator();
     if ($this->session instanceof JackalopeSession) {
         $this->useFetchDepth = 'jackalope.fetch_depth';
     }
 }
 /**
  * {@inheritDoc}
  */
 public function getEventManager()
 {
     return $this->wrapped->getEventManager();
 }
Пример #4
0
 /**
  * Initializes a new ListenersInvoker instance.
  *
  * @param DocumentManagerInterface $dm
  */
 public function __construct(DocumentManagerInterface $dm)
 {
     $this->eventManager = $dm->getEventManager();
     $this->dm = $dm;
 }