PrincipalFactory Interface Reference
Detailed Description
PrincipalFactory implementations are used to retrieve User and Role instances.
Definition at line 19 of file PrincipalFactory.php.
Inheritance diagram for PrincipalFactory:
Public Member Functions | |
getUser ($login, $useTempPermission=false) | |
getUserRoles (User $user, $useTempPermission=false) | |
getRole ($name, $useTempPermission=false) | |
Member Function Documentation
◆ getUser()
getUser | ( | $login, | |
$useTempPermission = false |
|||
) |
Get a User instance by login.
- Parameters
-
$login The user's login $useTempPermission Boolean whether to set a temporary permission for reading or not (uselfull in the login process, where no authenticated user exists yet) (optional, default: false)
- Returns
- User instance
Implemented in DefaultPrincipalFactory.
◆ getUserRoles()
getUserRoles | ( | User | $user, |
$useTempPermission = false |
|||
) |
Get the Role instances associated with the given User instance.
- Parameters
-
$user The User instance $useTempPermission Boolean whether to set a temporary permission for reading or not (uselfull in the login process, where no authenticated user exists yet) (optional, default: false)
- Returns
- Array of Role instances
Implemented in DefaultPrincipalFactory.
◆ getRole()
getRole | ( | $name, | |
$useTempPermission = false |
|||
) |
Get a Role instance by name.
- Parameters
-
$name The role's name $useTempPermission Boolean whether to set a temporary permission for reading or not (uselfull in the login process, where no authenticated user exists yet) (optional, default: false)
- Returns
- Role instance
Implemented in DefaultPrincipalFactory.