router_interface
interface router_interface
| internal |
Contract for the framework router responsible for route storage and URL generation.
Methods
Initialize routing context based on current request globals.
Register default internal routes required by the framework.
Scan controller annotations to populate route collection.
Get the full set of registered routes.
Get the active request context, if initialized.
Generate a Moodle URL for the given route name.
Register a single route mapping to a controller action.
Details
at line 35
void
initialize_context()
Initialize routing context based on current request globals.
at line 40
void
register_default_routes()
Register default internal routes required by the framework.
at line 48
void
scan_annotations(ContainerInterface $container, string|null $specific_class = null)
Scan controller annotations to populate route collection.
at line 53
RouteCollection
get_routes()
Get the full set of registered routes.
at line 58
RequestContext|null
get_context()
Get the active request context, if initialized.
at line 67
moodle_url
generate_url(string $route, array $parameters, int $reference_type)
Generate a Moodle URL for the given route name.
at line 78
void
register(string $name, string $path, string $controller, string $method, array $requirements = [])
Register a single route mapping to a controller action.