|
MediaWiki master
|
Manages information related to REST modules, such as routes and specs. More...
Public Member Functions | |
| __construct (ServiceOptions $options, array $extensionModuleFiles, BagOStuff $srvCache, ResponseFactory $responseFactory) | |
| getApiSpecs () | |
| Returns the available choices for APIs to explore. | |
| getDisabledRouteFiles () | |
| Useful for testing or error status. | |
| getModuleMode (string $moduleId) | |
| Gets the module mode for a given module id. | |
| getRouteFiles () | |
| hasApiSpecs () | |
| Returns true if any api specs are available, or false otherwise. | |
Public Attributes | |
| const | CONSTRUCTOR_OPTIONS |
Manages information related to REST modules, such as routes and specs.
TODO: consider whether some code in Router or SpecBasedModule might be better placed here. TODO: consider whether ModuleManager and Router can share caching.
Definition at line 19 of file ModuleManager.php.
| MediaWiki\Rest\Module\ModuleManager::__construct | ( | ServiceOptions | $options, |
| array | $extensionModuleFiles, | ||
| BagOStuff | $srvCache, | ||
| ResponseFactory | $responseFactory ) |
| ServiceOptions | $options | |
| string[] | $extensionModuleFiles | |
| BagOStuff | $srvCache | Optional BagOStuff instance to an APC-style cache. |
| ResponseFactory | $responseFactory |
Definition at line 83 of file ModuleManager.php.
References MediaWiki\Config\ServiceOptions\assertRequiredOptions(), MediaWiki\MainConfigNames\ExtensionDirectory, MediaWiki\Config\ServiceOptions\get(), MediaWiki\MainConfigNames\RestAPIAdditionalRouteFiles, MediaWiki\MainConfigNames\RestExternalModules, MediaWiki\MainConfigNames\RestModuleOverrides, MediaWiki\MainConfigNames\RestSandboxSpecs, and MediaWiki\MainConfigNames\ScriptPath.
| MediaWiki\Rest\Module\ModuleManager::getApiSpecs | ( | ) |
Returns the available choices for APIs to explore.
Definition at line 220 of file ModuleManager.php.
| MediaWiki\Rest\Module\ModuleManager::getDisabledRouteFiles | ( | ) |
Useful for testing or error status.
The return value will include route files that were disabled by either audience designation or configuration.
Definition at line 153 of file ModuleManager.php.
| MediaWiki\Rest\Module\ModuleManager::getModuleMode | ( | string | $moduleId | ) |
Gets the module mode for a given module id.
| string | $moduleId | The module id |
Definition at line 108 of file ModuleManager.php.
| MediaWiki\Rest\Module\ModuleManager::getRouteFiles | ( | ) |
Definition at line 138 of file ModuleManager.php.
Referenced by MediaWiki\Rest\Router\__construct().
| MediaWiki\Rest\Module\ModuleManager::hasApiSpecs | ( | ) |
Returns true if any api specs are available, or false otherwise.
Definition at line 207 of file ModuleManager.php.
| const MediaWiki\Rest\Module\ModuleManager::CONSTRUCTOR_OPTIONS |
Definition at line 66 of file ModuleManager.php.