Main Page | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

Modules Class Reference

Inheritance diagram for Modules:

Inheritance graph
[legend]
Collaboration diagram for Modules:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Modules ()
GetInstance ()
 _UpdateSession ()
 _RefreshModules ()
GetAllModules ()
GetModule ($id, $refresh=false)
_AccessModule ($id, $refresh=false)
InstallModule ($path)

Public Attributes

 $modulesid
 $modulesnames
 Connects names with ids.


Detailed Description

Class that manages the Modules system.

It is for modules like JUgrSystem is for Users, Groups and Roles.

Definition at line 20 of file Modules.class.php.


Constructor & Destructor Documentation

Modules::Modules  ) 
 

Constructs an object of this class.

This constructor should not be used directly. To get an instance of this class use the static method GetInstance, instead.

Definition at line 32 of file Modules.class.php.

Referenced by GetInstance().


Member Function Documentation

& Modules::_AccessModule id,
refresh = false
 

Gets the Module object of a group given its id or its name. It just takes it from the information in the session.

Parameters:
id The id or the name of the module.
refresh If it is true, it will access the DB and refresh the information stored in the session.
Returns:
Module.

Definition at line 145 of file Modules.class.php.

References $module, and JBaseObject::RaiseError().

Modules::_RefreshModules  ) 
 

Refreshes the information about the modules in the system

Definition at line 78 of file Modules.class.php.

References $module, and Module::GetAllModulesId().

Modules::_UpdateSession  ) 
 

Stores the object in session.

Definition at line 70 of file Modules.class.php.

References JSession::SetVar().

Referenced by GetInstance().

& Modules::GetAllModules  ) 
 

Gets all modules in the system.

Returns:
Array of Module indexed by id

Definition at line 102 of file Modules.class.php.

& Modules::GetInstance  ) 
 

Static method that returns the Modules object stored in session.

Returns:
Modules

Definition at line 41 of file Modules.class.php.

References _UpdateSession(), JSession::ExistsVar(), JSession::GetVar(), and Modules().

Referenced by Group::AddModule(), Role::AddPermission(), ConfigIncBackend::ConfigIncBackend(), JSystem::GetCurrentModule(), User::GetModules(), Group::GetModules(), HtmlInterface::HtmlInterface(), JSystem::InitModule(), HtmlCoreForms::PrintComboModules(), Role::RemovePermission(), Group::SetModuleName(), and ThrowEvent().

& Modules::GetModule id,
refresh = false
 

Gets the Module object of a group given its id or its name. It just takes it from the information in the session.

Parameters:
id The id or the name of the module.
refresh If it is true, it will access the DB and refresh the information stored in the session.
Returns:
Module.

Definition at line 115 of file Modules.class.php.

References $module, JSystem::IsError(), and JBaseObject::RaiseError().

& Modules::InstallModule path  ) 
 

Installs a new module in the system.

Parameters:
path The path where the new module is.
Returns:
The new module object or JError if there was an error.

Definition at line 180 of file Modules.class.php.

References $module, JSystem::GetLastError(), and JSystem::IsError().


Member Data Documentation

Modules::$modulesid
 

An array that connects the id of the modules and its name.

Definition at line 22 of file Modules.class.php.

Modules::$modulesnames
 

Connects names with ids.

Definition at line 24 of file Modules.class.php.


The documentation for this class was generated from the following file:
Generated on Wed Nov 19 20:29:44 2003 for James by doxygen 1.3.4