core.modulemanager

Loading and unloading

Modulemanager is primarily responsible for handling loading of modules, setting them up with their environments, API instance and sandbox.

Plugins should normally use module:depends() when they need another module to be loaded.

load(host, module)

Loads a module onto a host and fires a module-loaded event on success.

reload(host, module)

unload(host, module)

is_loaded(host, module)

Returns a boolean indicating whether a module is loaded on a host.

load_modules_for_host(host)

Calculates all modules to be loaded on a host that has just been activated. Invoked via a host-activated event fired by hostmanager.

Invoking module methods

call_module_method(module, method, …)

module_has_method()

Module data

get_items(key, host)

get_module(host, module)

get_modules(host)