FilterCollector
in package
FinalYes
Collects filters for a route.
Tags
Table of Contents
Properties
- $resetRoutes : bool
- Whether to reset Defined Routes.
Methods
- __construct() : mixed
-
get()
: array{before: list
, after: list } - Returns filters for the URI
-
getRequiredFilters()
: array{before: list
, after: list } - Returns Required Filters
- createFilters() : Filters
- createRouter() : Router
Properties
$resetRoutes read-only
Whether to reset Defined Routes.
private
bool
$resetRoutes
= false
If set to true, route filters are not found.
Methods
__construct()
public
__construct([bool $resetRoutes = false ]) : mixed
Parameters
- $resetRoutes : bool = false
get()
Returns filters for the URI
public
get(string $method, string $uri) : array{before: list, after: list}
Parameters
- $method : string
-
HTTP verb like
GET
,POST
orCLI
. - $uri : string
-
URI path to find filters for
Return values
array{before: listarray of filter alias or classname
getRequiredFilters()
Returns Required Filters
public
getRequiredFilters() : array{before: list, after: list}
Return values
array{before: listarray of filter alias or classname
createFilters()
private
createFilters(Request $request) : Filters
Parameters
- $request : Request
Return values
FilterscreateRouter()
private
createRouter(Request $request) : Router
Parameters
- $request : Request