Method |
Description |
|
__construct ( array $methods, string $pattern, callable $controller, string $name = null, array $options = [] ) |
|
|
__set_state ( array $data ) : static |
Re-build a Route object from data that has been var_export-ed. |
|
addAfterHook ( string $hook ) |
Add an after hook. |
|
addBeforeHook ( string $hook ) |
Add a before hook. |
|
addHook ( string $when, string $hook ) |
Add a before or after hook. |
|
getAfterHooks ( ) : string[] |
Get the route's after hooks. |
|
getBeforeHooks ( ) : string[] |
Get the route's before hooks. |
|
getController ( ) : callable |
Get the callable controller for the route. |
|
getMethods ( ) : string[] |
Get the methods the route responds to. |
|
getName ( ) : string | null |
Get the route's name. |
|
getOption ( $option ) : mixed |
Get a route option. |
|
getOptions ( ) : array |
Get the route options. |
|
getParams ( ) : array |
Get the parameters. Can only be called on a route that has been matched
against an URI (i.e. setParams has been called) |
|
getPattern ( ) : string |
Get the URI pattern the route should match against. |
|
setParams ( array $params ) |
When a match against the route has been confirmed, extract the parameters
from the URI and pass them as an associative array to this method. |
|
setRouter ( Autarky\Routing\RouterInterface $router ) |
Set the router the route objects use. |
|