AccessSubjectInterface extends JsonSerializable
Base interface for a subject that shall be handled during the sudo mode process.
A "subject" can be a resource, a route, a database record, anything. Specific implementations of this interface provide the details and behavior.
Table of Contents
Methods
- 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, ...)
- isOnce() : bool
- If true, the subject may only be used once and requires a new grant for the same task.
Methods
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
stringisOnce()
If true, the subject may only be used once and requires a new grant for the same task.
    public
                    isOnce() : bool