Routing cache.
The children of this route, used for nesting routes.
Contains all available conditions.
Directories to look for controllers in, first one has the highest precedence.
Already loaded controllers.
Custom route name, if defined.
Default route name.
Restrict HTTP methods this route is allowed to handle, defaults to no restrictions.
Pattern for this route.
Activate conditions for this route.
Registered placeholder types, by default only num is already defined.
Allow under semantics for this route.
Activate websocket semantics for this route.
Register a condition.
Generate route matching any of the listed HTTP request methods or all.
// Route with pattern and destination
route.any('/user').to('User#whatever');
// Route with HTTP methods, pattern, restrictive placeholders and destination
route.any(['DELETE', 'PUT'], '/:foo', {foo: /\w+/}).to('Foo#bar');
// Route with pattern, name and destination
route.any('/:foo').name('foo_route').to('Foo#bar');
// Route with pattern, condition and destination
route.any('/').requires({agent: /Firefox/}).to('Foo#bar');
// Route with pattern and a closure as destination
route.any('/:foo', async ctx => ctx.render({text: 'Hello World!'}));
Match routes and dispatch to actions with and without controllers.
Find child route by name, custom names have precedence over automatically generated ones.
Check if this route has a WebSocket ancestor and cache the result for future checks.
Check if this route qualifies as an endpoint.
Find route by name and cache all results for future lookups.
The name of this route, defaults to an automatically generated name based on the route pattern. Note that the name
current is reserved for referring to the current route.
Remove route from parent.
Render route with parameters into a path.
Activate conditions for this route. Note that this automatically disables the routing cache, since conditions are too complex for caching.
Suggested HTTP method for reaching this route, GET and POST are preferred.
Set default parameters for this route.
Generate route for a nested route with its own intermediate destination.
Prepare controllers for routing.
Generate route matching only WebSocket handshake requests.
Router class.