PHP Class EzRbacHook

A Simple Codeigniter Hook To handle all controller request
Author: Roni Kumar Saha ([email protected])
Datei anzeigen Open project: xiidea/ezrbac

Public Methods

Method Description
__construct ( ) Constructor to initial all data and libraries
__destruct ( ) Doing all cleanup stuff We haven't forgot to remove the package path after finishing everything!.
accessCheck ( ) : boolean The access Checking function

Private Methods

Method Description
end_now ( ) terminate the execution within the script! we will be stop here and further execution will be stopped I have not found anything to detect the exit , so doing it manually!! Hope the pice of code will not be necessary when i figure it out!!!
isPublicRequest ( ) : boolean Check if the request belongs to a public resource or not
loadConfiguration ( ) Load ezrbac configuration, the configuration can now put in application/config/ez_rbac.php also This way if user update this library the changed configuration can stay unchaged
load_libraries ( ) Load all system libraries and helpers needed by the library
manage_access ( ) : boolean This method will handle all library specific url like namege rbac or logout
restrict_access ( ) This method trigger when a restricted resource accessed

Method Details

__construct() public method

Constructor to initial all data and libraries
public __construct ( )

__destruct() public method

We do not need to load third party resources anymore!
public __destruct ( )

accessCheck() public method

The access Checking function
public accessCheck ( ) : boolean
return boolean