AutoRouteCollector
in package
Read onlyYes
FinalYes
Collects data for Auto Routing Improved.
Tags
Table of Contents
Properties
- $defaultController : string
- $defaultMethod : string
- $httpMethods : array<string|int, mixed>
- $namespace : string
- $prefix : string
- $protectedControllers : array<string|int, mixed>
Methods
- __construct() : mixed
- get() : array<int, array<int, string>>
-
addFilters()
: array<int, array{method: string, route: string, route_params: string, handler: string, params: array
, before: string, after: string}> - Adding Filters
- generateSampleUri() : string
Properties
$defaultController
private
string
$defaultController
$defaultMethod
private
string
$defaultMethod
$httpMethods
private
array<string|int, mixed>
$httpMethods
$namespace
private
string
$namespace
$prefix
private
string
$prefix
= ''
$protectedControllers
private
array<string|int, mixed>
$protectedControllers
Methods
__construct()
public
__construct(string $namespace, string $defaultController, string $defaultMethod, array<int, string> $httpMethods, array<int, class-string> $protectedControllers[, string $prefix = '' ]) : mixed
Parameters
- $namespace : string
-
namespace to search
- $defaultController : string
- $defaultMethod : string
- $httpMethods : array<int, string>
- $protectedControllers : array<int, class-string>
-
List of controllers in Defined Routes that should not be accessed via Auto-Routing.
- $prefix : string = ''
-
URI prefix for Module Routing
get()
public
get() : array<int, array<int, string>>
Return values
array<int, array<int, string>>addFilters()
Adding Filters
private
addFilters(array<int, array{method: string, route: string, route_params: string, handler: string, params: array, before?: string, after?: string}> $routes) : array<int, array{method: string, route: string, route_params: string, handler: string, params: array, before: string, after: string}>
Parameters
-
$routes
: array<int, array{method: string, route: string, route_params: string, handler: string, params: array
, before?: string, after?: string}>
Return values
array<int, array{method: string, route: string, route_params: string, handler: string, params: arraygenerateSampleUri()
private
generateSampleUri(array{method: string, route: string, route_params: string, handler: string, params: array, before?: string, after?: string} $route[, bool $longest = true ]) : string
Parameters
-
$route
: array{method: string, route: string, route_params: string, handler: string, params: array
, before?: string, after?: string} - $longest : bool = true