RouteAccessSubject implements AccessSubjectInterface
Representation of a backend route (and implicitly a module) that shall be handled during the sudo mode process.
Table of Contents
Interfaces
- AccessSubjectInterface
- Base interface for a subject that shall be handled during the sudo mode process.
Properties
- $group : string|null
- If given, grants access to same-group sudo mode subjects.
- $lifetime : AccessLifetime
- The distinct lifetime type, e.g. XS, S, M, L, XL
- $subject : string
- The route subject, e.g. `/module/tools/maintenance`
Methods
- __construct() : mixed
- fromArray() : static
- Reconstitutes a subject object from its serialized representation.
- getGroup() : string|null
- If given, grants access to same-group sudo mode subjects.
- getIdentity() : string
- Provides a unique string identifier of the subject.
- getLifetime() : AccessLifetime
- Provides a distinct lifetime type, e.g. XS, S, M, L, XL.
- getSubject() : string
- Provides the actual subject name (e.g. a route, an aspect, a resource, ...)
- jsonSerialize() : array<string|int, mixed>
Properties
$group
If given, grants access to same-group sudo mode subjects.
protected
string|null
$group
Example: If access to admin tool route "maintenance" (of group "systemMaintainer") was granted, access to other groups, like "settings" or "upgrade" are granted as well.
$lifetime
The distinct lifetime type, e.g. XS, S, M, L, XL
protected
AccessLifetime
$lifetime
$subject
The route subject, e.g. `/module/tools/maintenance`
protected
string
$subject
Methods
__construct()
public
final __construct(string $subject[, AccessLifetime|null $lifetime = null ][, string|null $group = null ]) : mixed
Parameters
- $subject : string
- $lifetime : AccessLifetime|null = null
- $group : string|null = null
fromArray()
Reconstitutes a subject object from its serialized representation.
public
static fromArray(array<string|int, mixed> $data) : static
Parameters
- $data : array<string|int, mixed>
Return values
staticgetGroup()
If given, grants access to same-group sudo mode subjects.
public
getGroup() : string|null
Return values
string|nullgetIdentity()
Provides a unique string identifier of the subject.
public
getIdentity() : string
Return values
stringgetLifetime()
Provides a distinct lifetime type, e.g. XS, S, M, L, XL.
public
getLifetime() : AccessLifetime
Return values
AccessLifetimegetSubject()
Provides the actual subject name (e.g. a route, an aspect, a resource, ...)
public
getSubject() : string
Return values
stringjsonSerialize()
public
jsonSerialize() : array<string|int, mixed>