/** * Constructor. * * Creates an instance of the ModuleAutoloader and injects the module paths * into it. * * @param ListenerOptions $options */ public function __construct(ListenerOptions $options = null) { parent::__construct($options); $this->generateCache = $this->options->getModuleMapCacheEnabled(); $this->moduleLoader = new ModuleAutoloader($this->options->getModulePaths()); if ($this->hasCachedClassMap()) { $this->generateCache = false; $this->moduleLoader->setModuleClassMap($this->getCachedConfig()); } }
/** * __construct * * @param ListenerOptions $options */ public function __construct(ListenerOptions $options = null) { parent::__construct($options); if ($this->hasCachedConfig()) { $this->skipConfig = true; $this->setMergedConfig($this->getCachedConfig()); } else { $this->addConfigGlobPaths($this->getOptions()->getConfigGlobPaths()); $this->addConfigStaticPaths($this->getOptions()->getConfigStaticPaths()); } }
/** * {@inheritDoc} */ public function __construct(ListenerOptions $options = null) { // Skip parent constructor to avoid instantiation of moduleLoader, // that will be replaced by a customized one. This is an ugly // workaround for performance reasons. AbstractListener::__construct($options); $this->generateCache = $this->options->getModuleMapCacheEnabled(); $this->moduleLoader = new ModuleAutoloader($this->options->getModulePaths()); if ($this->hasCachedClassMap()) { $this->generateCache = false; $this->moduleLoader->setModuleClassMap($this->getCachedConfig()); } }