PHP Class Redaxscript\Auth

Since: 3.0.0
Author: Henry Ruhs
Afficher le fichier Open project: redaxmedia/redaxscript Class Usage Examples

Protected Properties

Свойство Type Description
$_callArray array array of the call
$_permissionArray array array of the permission
$_request object instance of the request class
$_typeArray array array of the type
$_userArray array array of the user

Méthodes publiques

Méthode Description
__call ( string $method = null, array $argumentArray = [] ) : mixed call method as needed
__construct ( Request $request ) constructor of the class
getPermission ( string $key = null ) : mixed get the permission
getStatus ( ) : boolean get the auth status
getUser ( string $key = null ) : mixed get the user
init ( ) init the class
login ( integer $userId = null ) : boolean login the user
logout ( ) : boolean logout the user
save ( ) : boolean save user and permission
setPermission ( string $key = null, integer $value = null ) set the permission
setUser ( string $key = null, string $value = null ) set the user

Method Details

__call() public méthode

call method as needed
Since: 3.0.0
public __call ( string $method = null, array $argumentArray = [] ) : mixed
$method string name of the method
$argumentArray array arguments of the method
Résultat mixed

__construct() public méthode

constructor of the class
Since: 3.0.0
public __construct ( Request $request )
$request Request instance of the request class

getPermission() public méthode

get the permission
Since: 3.0.0
public getPermission ( string $key = null ) : mixed
$key string key of the permission
Résultat mixed

getStatus() public méthode

get the auth status
Since: 3.0.0
public getStatus ( ) : boolean
Résultat boolean

getUser() public méthode

get the user
Since: 3.0.0
public getUser ( string $key = null ) : mixed
$key string key of the user
Résultat mixed

init() public méthode

init the class
Since: 3.0.0
public init ( )

login() public méthode

login the user
Since: 3.0.0
public login ( integer $userId = null ) : boolean
$userId integer identifier of the user
Résultat boolean

logout() public méthode

logout the user
Since: 3.0.0
public logout ( ) : boolean
Résultat boolean

save() public méthode

save user and permission
Since: 3.0.0
public save ( ) : boolean
Résultat boolean

setPermission() public méthode

set the permission
Since: 3.0.0
public setPermission ( string $key = null, integer $value = null )
$key string key of the permission
$value integer value of the permission

setUser() public méthode

set the user
Since: 3.0.0
public setUser ( string $key = null, string $value = null )
$key string key of the user
$value string value of the user

Property Details

$_callArray protected_oe property

array of the call
protected array $_callArray
Résultat array

$_permissionArray protected_oe property

array of the permission
protected array $_permissionArray
Résultat array

$_request protected_oe property

instance of the request class
protected object $_request
Résultat object

$_typeArray protected_oe property

array of the type
protected array $_typeArray
Résultat array

$_userArray protected_oe property

array of the user
protected array $_userArray
Résultat array