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

JSystem Class Reference

Inheritance diagram for JSystem:

Inheritance graph
[legend]
Collaboration diagram for JSystem:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 JSystem ()
 Login ($login, $pass)
 AnonLogin ()
 IsLogged ()
 IsAnonymous ()
 Logout ()
 LoadModuleGroup ($group, $module, $idRMG)
 LoadModuleGlobalGroup ($module, $idRMG)
 LoadModule ($module, $idRMG=0)
 UnloadModule ()
InitModule ($name)
GetCurrentUser ()
GetCurrentGroup ()
 IsGlobalGroup ()
GetCurrentModule ()
 GetConfig ($key)
 SetConfig ($keys, $user=true, $group=false)
 IsError ($error)
 GetLastError ()

Detailed Description

Main class in the system. It is nearly a frontend for other system classes: JContext, JConfig, JErrorHandler...

Note:
The include_once's are placed in the method implementations instead of in the beginning of this file in order to make it more efficient.

Definition at line 28 of file JSystem.class.php.


Constructor & Destructor Documentation

JSystem::JSystem  ) 
 

Initializes all the system.

Definition at line 33 of file JSystem.class.php.

References JSession::CleanAll(), and JContext::GetInstance().


Member Function Documentation

JSystem::AnonLogin  ) 
 

Makes an anonymous login in the system

Returns:
boolean True if everything was ok.

Definition at line 85 of file JSystem.class.php.

References GetConfig(), JContext::GetInstance(), and JUgrSystem::GetInstance().

JSystem::GetConfig key  ) 
 

Gets the config value.

Parameters:
key The name of the config key.
Returns:
value

Definition at line 372 of file JSystem.class.php.

References JConfig::GetInstance().

Referenced by Module::_GetInfoFilePath(), AnonLogin(), HtmlInterface::CheckSession(), ConfigIncBackend::ConfigIncBackend(), DBJames::DBJames(), HtmlInterface::GetCSSPath(), HtmlInterface::GetInterfaceModule(), HtmlInterface::GetLoginModule(), HtmlInterface::HtmlInterface(), and ModuleInstall::SetInfoFile().

& JSystem::GetCurrentGroup  ) 
 

Gets the current active group in the system.

Returns:
Group.

Definition at line 329 of file JSystem.class.php.

References JUgrSystem::GetInstance(), and JContext::GetInstance().

Referenced by JConfig::JConfig().

& JSystem::GetCurrentModule  ) 
 

Gets the current active module in the system.

Returns:
Module.

Definition at line 356 of file JSystem.class.php.

References Modules::GetInstance(), and JContext::GetInstance().

Referenced by HtmlInterface::GetCurrentModulePath(), User::HasPermission(), and InitModule().

& JSystem::GetCurrentUser  ) 
 

Gets the current user in the system.

Returns:
User.

Definition at line 317 of file JSystem.class.php.

References JUgrSystem::GetInstance(), and JContext::GetInstance().

Referenced by JConfig::JConfig().

JSystem::GetLastError  ) 
 

Static method that returns the last error that has happened in the system

Returns:
JError object.

Reimplemented from JBaseObject.

Definition at line 414 of file JSystem.class.php.

References JErrorHandler::GetInstance().

Referenced by JUgrSystem::AddGroup(), User::Create(), Role::Create(), Group::Create(), JUgrSystem::GetUser(), InitModule(), and Modules::InstallModule().

& JSystem::InitModule name  ) 
 

Initializes a module: checks if the module is loaded. If not, it tries to load it. It also returns a reference to the module.

Parameters:
name The name of the module
Returns:
Module

Definition at line 283 of file JSystem.class.php.

References CURRENT_GROUP, CURRENT_MODULE, CURRENT_USER, GetCurrentModule(), JUgrSystem::GetInstance(), JContext::GetInstance(), Modules::GetInstance(), GetLastError(), IsError(), IsLogged(), LoadModule(), and JBaseObject::RaiseError().

Referenced by HtmlInterface::HtmlInterface().

JSystem::IsAnonymous  ) 
 

Checks if the current user is the anonymous one

Returns:
boolean

Definition at line 132 of file JSystem.class.php.

References JContext::GetInstance().

JSystem::IsError error  ) 
 

Static method that checks whether the given object is an error or not

Parameters:
error An object.
Returns:
boolean. Indicating whether the object was an error or not.

Definition at line 405 of file JSystem.class.php.

References JErrorHandler::IsError().

Referenced by JUgrSystem::AddGroup(), Group::AddModule(), Role::AddPermission(), User::AddToGroup(), Group::AddUser(), DefaultAuth::Authenticate(), HtmlInterface::CheckSession(), ModuleInstall::ConfigInstall(), User::Create(), Role::Create(), Group::Create(), JUgrSystem::GetGroup(), Modules::GetModule(), JUgrSystem::GetRole(), JUgrSystem::GetUser(), HtmlInterface::HtmlInterface(), InitModule(), ModuleInstall::Install(), Modules::InstallModule(), JConfig::JConfig(), LoadModuleGlobalGroup(), LoadModuleGroup(), ModuleInfoInc::ModuleInfoInc(), ModuleInfoXml::ModuleInfoXml(), ModuleInstall::PermissionsInstall(), User::Remove(), Role::Remove(), Group::Remove(), User::RemoveFromGroup(), JUgrSystem::RemoveGroup(), Role::RemovePermission(), JUgrSystem::RemoveRole(), User::SetRole(), and ThrowEvent().

JSystem::IsGlobalGroup  ) 
 

Returns whether the current group is the global group

Returns:
boolean

Definition at line 346 of file JSystem.class.php.

References JContext::GetInstance().

JSystem::IsLogged  ) 
 

Checks if the session is active.

Returns:
boolean

Definition at line 122 of file JSystem.class.php.

References JContext::GetInstance().

Referenced by HtmlInterface::CheckSession(), and InitModule().

JSystem::LoadModule module,
idRMG = 0
 

Loads a module in the system.

Parameters:
module The module identifier.
idRMG The identifier of the module in the group.

Definition at line 248 of file JSystem.class.php.

References JContext::GetInstance(), and ThrowEvent().

Referenced by InitModule(), LoadModuleGlobalGroup(), and LoadModuleGroup().

JSystem::LoadModuleGlobalGroup module,
idRMG
 

Sets a module in the global group as the active one in the system.

Parameters:
module The module.
idRMG The module identifier in the group.
Returns:
boolean True if everything was ok.

Definition at line 206 of file JSystem.class.php.

References $module, JUgrSystem::GetInstance(), JContext::GetInstance(), IsError(), and LoadModule().

JSystem::LoadModuleGroup group,
module,
idRMG
 

Sets a group and a module as the active ones in the system.

Parameters:
group The group
module The module.
idRMG The module identifier in the group.
Returns:
boolean True if everything was ok.

Definition at line 163 of file JSystem.class.php.

References $module, JUgrSystem::GetInstance(), JContext::GetInstance(), IsError(), and LoadModule().

JSystem::Login login,
pass
 

Makes the login for a normal user.

This function makes the login for a normal user.

Parameters:
login Login of the user.
pass Password of the user.
Returns:
False if the login failed.

Definition at line 48 of file JSystem.class.php.

References JAuth::GetAuthSystem(), JContext::GetInstance(), and JUgrSystem::GetInstance().

JSystem::Logout  ) 
 

Logs out the current user of the system

Definition at line 141 of file JSystem.class.php.

References JSession::CleanAll(), JContext::GetInstance(), and UnloadModule().

JSystem::SetConfig keys,
user = true,
group = false
 

Sets a config value.

Parameters:
keys An array with key, value pairs.
user boolean indicating whether the config value will be stored in the user config or not.
group boolean idem with group.

Definition at line 393 of file JSystem.class.php.

References JConfig::GetInstance().

JSystem::UnloadModule  ) 
 

Unloads the active module.

Definition at line 264 of file JSystem.class.php.

References JContext::GetInstance(), and ThrowEvent().

Referenced by Logout().


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