PrincipalContext
Read onlyYes
FinalYes
Represents the identity and group membership of a principal for authorization.
Contains the core identity information needed for permission evaluation, including the role level, unique identifier, group memberships, and impersonation context. This is used as part of the Principal object to provide context for permission checks.
Table of Contents
Properties
- $groupIds : array<string|int, mixed>
- $id : int
- $impersonatedBy : self|null
- $role : PrincipalRole
Methods
- __construct() : mixed
Properties
$groupIds
public
array<string|int, mixed>
$groupIds
= []
$id
public
int
$id
$impersonatedBy
public
self|null
$impersonatedBy
= null
$role
public
PrincipalRole
$role
Methods
__construct()
public
__construct(PrincipalRole $role, int $id[, array<string|int, int> $groupIds = [] ][, self|null $impersonatedBy = null ]) : mixed
Parameters
- $role : PrincipalRole
-
The role level of the principal
- $id : int
-
The unique identifier of the principal (user ID, system ID)
- $groupIds : array<string|int, int> = []
-
List of group IDs the principal belongs to
- $impersonatedBy : self|null = null
-
Optional parent context when impersonation is active