/** * 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(); }
/** * @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(); }
/** * Initializes a new ListenersInvoker instance. * * @param DocumentManagerInterface $dm */ public function __construct(DocumentManagerInterface $dm) { $this->eventManager = $dm->getEventManager(); $this->dm = $dm; }