PHP Class Accessmap

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

Public Methods

Method 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

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

Method Details

__call() public method

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

Return access mode or false on any undefined function call

__construct() public method

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

can() public method

public can ( $action )

getAccessDetails() public method

Get all access mode array
public getAccessDetails ( ) : array
return array of access mode.

get_access_map() public method

return the access_map array
public get_access_map ( ) : array
return array

get_access_str() public method

return the _access_val
public get_access_str ( ) : integer
return integer

initialize() public method

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

isGuest() public method

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

validate() public method

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