Property | Type | Description | |
---|---|---|---|
$cachePath | string | null | ||
$currentHooks | array | The hooks that are currently applied to every route being added. | |
$currentPrefix | string | The URL prefix that is currently applied to every route being added. | |
$currentRoute | |||
$dispatchData | mixed | ||
$eventDispatcher | Symfony\Component\EventDispatcher\EventDispatcherInterface | ||
$hooks | array | ||
$invoker | Autarky\Routing\InvokerInterface | ||
$namedRoutes | array | ||
$routeCollector | FastRoute\RouteCollector | ||
$routeParser | FastRoute\RouteParser | ||
$routes | SplObjectStorage |
Method | Description | |
---|---|---|
__construct ( FastRoute\RouteParser $routeParser, Autarky\Routing\InvokerInterface $invoker, Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher = null, string | null $cachePath = null ) | ||
addAfterHook ( string $name, callable $handler, integer $priority ) : void | Add an "after" event listener. | |
addBeforeHook ( string $name, callable $handler, integer $priority ) : void | Add a "before" event listener. | |
addCachedRoute ( |
Add a cached route. | |
addGlobalAfterHook ( callable $handler, integer $priority ) : void | Add a global "after" event listener. | |
addGlobalBeforeHook ( callable $handler, integer $priority ) : void | Add a global "before" event listener. | |
addRoute ( $methods, $path, $controller, $name = null, array $options = [] ) | ||
dispatch ( |
||
getCurrentRoute ( ) | ||
getRoute ( $name ) | ||
getRouteForRequest ( |
Get the Route object corresponding to a given request. | |
getRoutes ( ) : SplObjectStorage | ||
group ( array $flags, Closure $callback ) | ||
isCaching ( ) : boolean | ||
mount ( array $routes, $path = '/' ) |
Method | Description | |
---|---|---|
addEventListener ( $name, $handler, $when, $priority ) | ||
addNamedRoute ( $name, |
||
createRoute ( $methods, $path, $controller, $name, array $options ) | ||
generateDispatchData ( ) | ||
getContainerParams ( |
||
getDispatcher ( ) | ||
getHook ( $name ) | ||
getResponse ( |
||
makePath ( $path ) | ||
matchRoute ( |
public __construct ( FastRoute\RouteParser $routeParser, Autarky\Routing\InvokerInterface $invoker, Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher = null, string | null $cachePath = null ) | ||
$routeParser | FastRoute\RouteParser | |
$invoker | Autarky\Routing\InvokerInterface | |
$eventDispatcher | Symfony\Component\EventDispatcher\EventDispatcherInterface | |
$cachePath | string | null |
public addCachedRoute ( |
||
$route |
protected addEventListener ( $name, $handler, $when, $priority ) |
protected createRoute ( $methods, $path, $controller, $name, array $options ) | ||
$options | array |
public dispatch ( |
||
$request |
protected getContainerParams ( |
||
$route | ||
$routeParams | array | |
$request |
protected getResponse ( |
||
$request | ||
$route | ||
$params | array |
public getRouteForRequest ( |
||
$request | ||
return |
protected matchRoute ( |
||
$route | ||
$params | array | |
$request |
protected array $currentHooks | ||
return | array |
protected string $currentPrefix | ||
return | string |
protected EventDispatcherInterface,Symfony\Component\EventDispatcher $eventDispatcher | ||
return | Symfony\Component\EventDispatcher\EventDispatcherInterface |
protected InvokerInterface,Autarky\Routing $invoker | ||
return | Autarky\Routing\InvokerInterface |
protected RouteCollector,FastRoute $routeCollector | ||
return | FastRoute\RouteCollector |
protected RouteParser,FastRoute $routeParser | ||
return | FastRoute\RouteParser |