/** * {@inheritdoc} */ public function getMetadataFactory() { return $this->wrapped->getMetadataFactory(); }
/** * Get the configuration for specific object class * if cache driver is present it scans it also * * @param ObjectManager $objectManager * @param string $class * @return array */ public function getConfiguration($objectManager, $class) { $config = array(); if (isset($this->configurations[$class])) { $config = $this->configurations[$class]; } else { $cacheDriver = $objectManager->getMetadataFactory()->getCacheDriver(); $cacheId = ExtensionMetadataFactory::getCacheId($class, $this->getNamespace()); if ($cacheDriver && ($cached = $cacheDriver->fetch($cacheId)) !== false) { $this->configurations[$class] = $cached; $config = $cached; } } return $config; }