AuthorizationResult
Read onlyYes
FinalYes
Immutable value object representing the result of an authorization check
Table of Contents
Properties
- $authorized : bool
- $failedAttribute : Authorize|null
- $failureReason : AuthorizationFailureReason|null
Methods
- allowed() : self
- denied() : self
- isAllowed() : bool
- isDenied() : bool
Properties
$authorized
public
bool
$authorized
$failedAttribute
public
Authorize|null
$failedAttribute
= null
$failureReason
public
AuthorizationFailureReason|null
$failureReason
= null
Methods
allowed()
public
static allowed() : self
Return values
selfdenied()
public
static denied(AuthorizationFailureReason $reason, Authorize $attribute) : self
Parameters
- $reason : AuthorizationFailureReason
- $attribute : Authorize
Return values
selfisAllowed()
public
isAllowed() : bool
Return values
boolisDenied()
public
isDenied() : bool