Handles all the loading, unloading and management of modules.

package Core

 Methods

Checks if the given module exists.

exists(string $module) : bool | string

Parameters

$module

string

The module name

Returns

boolstringPath to the module found, or false if not found

Loads the given module.

load(string | array $module, string | null $path) : bool

If a path is not given, then 'module_paths' is used. It also accepts an array of modules as the first parameter.

Parameters

$module

stringarray

The module name or array of modules.

$path

stringnull

The path to the module

Exceptions

\ModuleNotFoundException

Returns

boolTrue on success, False on fail or already loaded.

Checks if the given module is loaded, if no module is given then all loaded modules are returned.

loaded(string | null $module) : bool | array

Parameters

$module

stringnull

The module name or null

Returns

boolarrayWhether the module is loaded, or all modules

Unloads a module from the stack.

unload(string $module) : void

Parameters

$module

string

The module name

 Properties

 

<p>Holds all the loaded module information.</p>

$modules : array