Doctrine\ODM\PHPCR\Mapping\ClassMetadataFactory::__construct PHP Method

__construct() public method

Creates a new factory instance that uses the given DocumentManager instance.
public __construct ( Doctrine\ODM\PHPCR\DocumentManagerInterface $dm )
$dm Doctrine\ODM\PHPCR\DocumentManagerInterface 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();
    }