PHP Class Accessmap

A Simple Access Control Mapping Library
Author: Roni Kumar Saha ([email protected])
Afficher le fichier Open project: xiidea/ezrbac

Méthodes publiques

Méthode Description
__call ( $method, $arguments ) : boolean Magic function to handle the access mode dynamically
__construct ( array $param = [] )
can ( $action )
getAccessDetails ( ) : array Get all access mode array
get_access_map ( ) : array return the access_map array
get_access_str ( ) : integer return the _access_val
initialize ( $controller, boolean $access_role = FALSE ) Initialize the access checking variables
isGuest ( ) : boolean check if the access is from any loged in user or not by checking the existance of session data
validate ( $access_str ) : String. Return Binary string in a acceptable format

Private Methods

Méthode Description
get_permission ( $controller, boolean | integer $access_role = FALSE ) : Integer. Return User permission value

Method Details

__call() public méthode

Magic function to handle the access mode dynamically
public __call ( $method, $arguments ) : boolean
Résultat boolean

Return access mode or false on any undefined function call

__construct() public méthode

public __construct ( array $param = [] )
$param array array get the controller name

can() public méthode

public can ( $action )

getAccessDetails() public méthode

Get all access mode array
public getAccessDetails ( ) : array
Résultat array of access mode.

get_access_map() public méthode

return the access_map array
public get_access_map ( ) : array
Résultat array

get_access_str() public méthode

return the _access_val
public get_access_str ( ) : integer
Résultat integer

initialize() public méthode

Initialize the access checking variables
public initialize ( $controller, boolean $access_role = FALSE )
$controller
$access_role boolean

isGuest() public méthode

check if the access is from any loged in user or not by checking the existance of session data
public isGuest ( ) : boolean
Résultat boolean

validate() public méthode

Return Binary string in a acceptable format
public validate ( $access_str ) : String.
Résultat String.