protected function getDocsConfig($module) { $moduleConfigPath = $this->moduleUtils->getModuleConfigPath($module); $docConfigPath = dirname($moduleConfigPath) . '/documentation.config.php'; if (!file_exists($docConfigPath)) { return null; } $documentation = (include $docConfigPath); return $this->configFactory->createConfigResource($documentation, $docConfigPath); }
/** * Retrieve a ConfigResource for a given module * * @param string $moduleName * @return ConfigResource */ public function factory($moduleName) { $moduleName = $this->normalizeModuleName($moduleName); if (isset($this->resources[$moduleName])) { return $this->resources[$moduleName]; } $moduleConfigPath = $this->modules->getModuleConfigPath($moduleName); $config = (include $moduleConfigPath); $this->resources[$moduleName] = new ConfigResource($config, $moduleConfigPath, $this->writer); return $this->resources[$moduleName]; }
/** * @param $module * @return \ZF\Configuration\ConfigResource */ protected function getDocumentationConfigResource($module) { $moduleConfigPath = $this->moduleUtils->getModuleConfigPath($module); $docConfigPath = dirname($moduleConfigPath) . '/documentation.config.php'; $docArray = file_exists($docConfigPath) ? include $docConfigPath : []; return $this->configFactory->createConfigResource($docArray, $docConfigPath); }
/** * Retrieve the documentation for a given API module * * @param string $apiName * @return array */ protected function getDocumentationConfig($apiName) { if (isset($this->docs[$apiName])) { return $this->docs[$apiName]; } $moduleConfigPath = $this->configModuleUtils->getModuleConfigPath($apiName); $docConfigPath = dirname($moduleConfigPath) . '/documentation.config.php'; if (file_exists($docConfigPath)) { $this->docs[$apiName] = (include $docConfigPath); } else { $this->docs[$apiName] = []; } return $this->docs[$apiName]; }