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(); }