PrincipalFactory Interface Reference

Detailed Description

PrincipalFactory implementations are used to retrieve User and Role instances.

Author
ingo herwig ingo@.nosp@m.wemo.nosp@m.ve.co.nosp@m.m

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
$loginThe user's login
$useTempPermissionBoolean 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
$userThe User instance
$useTempPermissionBoolean 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
$nameThe role's name
$useTempPermissionBoolean 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.