RouteProtection
in package
FinalYes
Tags
Table of Contents
Methods
- hasEnforcer() : bool
- Whether the middleware list contains an authorization enforcer, given either as an instance or as a class-string.
- requirementOf() : class-string|null
- The first authorization-requirement attribute declared on the handler class, or null when the handler declares none (closures cannot carry class attributes; unloadable classes are reported by handler resolution with its own error).
Methods
hasEnforcer()
Whether the middleware list contains an authorization enforcer, given either as an instance or as a class-string.
public
static hasEnforcer(iterable<string|int, mixed> $middleware) : bool
Parameters
- $middleware : iterable<string|int, mixed>
Return values
boolrequirementOf()
The first authorization-requirement attribute declared on the handler class, or null when the handler declares none (closures cannot carry class attributes; unloadable classes are reported by handler resolution with its own error).
public
static requirementOf(string|Closure $handler) : class-string|null
Parameters
- $handler : string|Closure
-
Class name, 'Class::method' string, or Closure.