Class humhub\components\bootstrap\ModuleAutoLoader

Inheritancehumhub\components\bootstrap\ModuleAutoLoader
Implementsyii\base\BootstrapInterface

ModuleAutoLoader automatically searches for config.php files in module folder an executes them.

Public Methods

Hide inherited methods

MethodDescriptionDefined By
bootstrap() Bootstrap method to be called during application bootstrap stage. humhub\components\bootstrap\ModuleAutoLoader
findModules() Find all modules with configured paths humhub\components\bootstrap\ModuleAutoLoader
findModulesByPath() Find all directories with a configuration file inside humhub\components\bootstrap\ModuleAutoLoader
locateModules() Find available modules humhub\components\bootstrap\ModuleAutoLoader

Constants

Hide inherited constants

ConstantValueDescriptionDefined By
CACHE_ID 'module_configs' humhub\components\bootstrap\ModuleAutoLoader
CONFIGURATION_FILE 'config.php' humhub\components\bootstrap\ModuleAutoLoader

Method Details

bootstrap() public method

Bootstrap method to be called during application bootstrap stage.

public void bootstrap ( $app )
$app humhub\components\Application

The application currently running

throws \yii\base\InvalidConfigException
findModules() public static method

Find all modules with configured paths

public static array findModules ( $paths )
$paths array
findModulesByPath() public static method

Find all directories with a configuration file inside

public static array findModulesByPath ( $path )
$path string
locateModules() public static method
Deprecated since version 1.3: replace call for locateModules with findModules and handle caching outside of method (e.g. in boostrap)

Find available modules

public static array|boolean|mixed locateModules ( )