3.5.2.10. Modules

File: classes/Modules.php
The Modules class provides support for modules. See documentation of modules.

3.5.2.10.1. Add_Module
Format: result = Add_Module(name,config)
where "name" is the module name and "config" is 1 if the module had configuration options, or 0 otherwise.
Example: $result = $modules->Add_Module('MyModule',1);

This method adds a new module with the given name. This means that the module is installed and ready for use. All module names must be unique. The prefix "EWE" is reserved for standard EWE module names.

3.5.2.10.2. Get_Module
Format: result = Get_Module(name)
where "name" is the module name.
Example: $result = $modules->Get_Module($name);

This method returns an array of information about the specified module.

3.5.2.10.3. Get_Module_Name
Format: result = Get_Module_Name(id)
where "id" is the module ID.
Example: $result = $modules->Get_Module_Name($id);

This method returns the name of the module with the specified ID.

3.5.2.10.4. Get_Modules
Format: result = Get_Modules()
Example: $result = $modules->Get_Modules();

This method returns an array of modules. Each element of the array is an array of values for a module.

3.5.2.10.5. Remove_Module
Format: result = Remove_Module(id)
Example: $result = $modules->Remove_Module($id);

This method removes a module from the installed module list.

3.5.2.10.6. resolve_module
Format: result = resolve_module(module)
where "module" is either the module name or the module ID.
Example: $result = $modules->resolve_module($mod);

This method returns a module ID for a given module name or ID. If not valid, -1 is returned.