PHP Interface Prado\Security\IUser

This interface must be implemented by user objects.
Since: 3.0
Author: Qiang Xue ([email protected])
Afficher le fichier Open project: pradosoft/prado

Méthodes publiques

Méthode Description
getIsGuest ( ) : boolean
getName ( ) : string
getRoles ( ) : array
isInRole ( $role ) : boolean
loadFromString ( $string ) : Prado\Security\IUser
saveToString ( ) : string
setIsGuest ( $value )
setName ( $value )
setRoles ( $value ) : array | string

Method Details

getIsGuest() public méthode

public getIsGuest ( ) : boolean
Résultat boolean if the user is a guest

getName() public méthode

public getName ( ) : string
Résultat string username

getRoles() public méthode

public getRoles ( ) : array
Résultat array list of roles that the user is of

isInRole() public méthode

public isInRole ( $role ) : boolean
Résultat boolean whether the user is of this role

loadFromString() public méthode

public loadFromString ( $string ) : Prado\Security\IUser
Résultat Prado\Security\IUser the user object

saveToString() public méthode

public saveToString ( ) : string
Résultat string user data that is serialized and will be stored in session

setIsGuest() public méthode

public setIsGuest ( $value )

setName() public méthode

public setName ( $value )

setRoles() public méthode

public setRoles ( $value ) : array | string
Résultat array | string list of roles that the user is of. If it is a string, roles are assumed by separated by comma