Public Member Functions | |
| isLogged () | |
| login ($prm=null, $page=null) | |
| logout ($prm=null) | |
| addRole ($role) | |
| hasRole ($role=null) | |
| delRole ($role=null) | |
| check (array $url=null, $redirect=true) | |
| getLoginForm (array $prm=array()) | |
| protect ($page=null) | |
| getPage ($type='login', $uri=false) | |
| getAttr ($name) | |
| setAttr ($name, $value) | |
| getCfg () | |
Protected Member Functions | |
| afterInit () | |
| hook ($name) | |
| isContained (array $url, array $checks) | |
| beforeInit () | |
Protected Attributes | |
| $cfg | |
Security class to check user rights, which allow everything to anybody by default
Definition at line 10 of file public.class.php.
| addRole | ( | $ | role | ) |
Add a role to the current user
| mixed | $role |
Reimplemented from security_abstract.
Definition at line 26 of file public.class.php.
| afterInit | ( | ) | [protected, inherited] |
Call just after the configuration initialisation
Reimplemented from object.
Reimplemented in security_default.
Definition at line 12 of file security/abstract.class.php.
| beforeInit | ( | ) | [protected, inherited] |
Call just before the configuration initialisation
Reimplemented in form_file.
Definition at line 35 of file object.class.php.
| check | ( | array $ | url = null, |
|
| $ | redirect = true | |||
| ) |
Check if the user can access to the url given in the array (request style) or the current URL if null is given
| null|array | $url | |
| bool | $redirect Indicate if the user should be directly redirected and exit the program |
Reimplemented from security_abstract.
Definition at line 38 of file public.class.php.
| delRole | ( | $ | role = null |
) |
Delete a role or all roles
| null|mixed | $role null to delete all roles |
Reimplemented from security_abstract.
Definition at line 34 of file public.class.php.
| getAttr | ( | $ | name | ) | [inherited] |
Get an attribute
| string | $name Attribute name |
Reimplemented in response_proxy.
Definition at line 48 of file object.class.php.
| getCfg | ( | ) | [inherited] |
| getLoginForm | ( | array $ | prm = array() |
) |
Get the login Form Object
Reimplemented from security_abstract.
Definition at line 55 of file public.class.php.
| getPage | ( | $ | type = 'login', |
|
| $ | uri = false | |||
| ) | [inherited] |
Get a configured page
| string | $type Pagename (login, logged, logout, forbidden) | |
| bool | $uri Indiciate if the url should be parsed with request::uri to be used directly |
Definition at line 101 of file security/abstract.class.php.
| hasRole | ( | $ | role = null |
) |
Check if the current user has a specific role or retrun the whole roles
| null|mixed | $role null to get all roles |
Reimplemented from security_abstract.
Definition at line 30 of file public.class.php.
| hook | ( | $ | name | ) | [protected, inherited] |
Function to be rewritten in eventual child to change the way security works Available actions:
| string | $action |
Definition at line 117 of file security/abstract.class.php.
| isContained | ( | array $ | url, | |
| array $ | checks | |||
| ) | [protected, inherited] |
Indicate if a configuration array is contained in the url
| array | $url | |
| array | $checks |
Definition at line 126 of file security/abstract.class.php.
| isLogged | ( | ) |
Check if the user is logged
Reimplemented from security_abstract.
Definition at line 12 of file public.class.php.
| login | ( | $ | prm = null, |
|
| $ | page = null | |||
| ) |
Login the current user
| mixed | $prm | |
| null|string | $page The page where to be redirected. If null, config will be used |
Reimplemented from security_abstract.
Definition at line 16 of file public.class.php.
| logout | ( | $ | prm = null |
) |
Logout the current user
| mixed | $prm |
Reimplemented from security_abstract.
Definition at line 21 of file public.class.php.
| protect | ( | $ | page = null |
) | [inherited] |
Redirect the user if not logged
| null|string | $page Page to redirect or configured page forbidden if not provided |
Definition at line 88 of file security/abstract.class.php.
| setAttr | ( | $ | name, | |
| $ | value | |||
| ) | [inherited] |
Set an attribute
| string | $name Attribute name | |
| mixed | $value Attribute value |
Reimplemented in response_proxy.
Definition at line 58 of file object.class.php.
$cfg [protected, inherited] |
Definition at line 17 of file object.class.php.
1.7.1