|
Moodle PHP Documentation 5.0
Moodle 5.0.1+ (Build: 20250711) (61af040cd5f)
|
Public Member Functions | |
| __construct (protected response_handler response_handler $responsehandler, protected route_loader_interface readonly route_loader_interface $routeloader, protected request_validator_interface request_validator_interface $requestvalidator, protected response_validator_interface response_validator_interface $responsevalidator, ?string $basepath=null,) | |
| Create a new Router. | |
| get_app () | |
| Get the configured SlimPHP Application. | |
| get_response_factory () | |
| Get the Response Factory for the Router. | |
| handle_request (ServerRequestInterface $request,) | |
| Handle the specified Request. | |
| serve () | |
| Serve the current request using global variables. | |
Public Attributes | |
| string readonly string | $basepath |
| The base path to use for all requests. | |
Protected Member Functions | |
| add_error_handler_middleware () | |
| Add the Error Handling Middleware to the RouteGroup. | |
| add_middleware () | |
| Add Middleware to the App. | |
| configure_api_route (RouteGroupInterface $group) | |
| Configure the API Route Middleware. | |
| configure_caching () | |
| Configure caching for the routes. | |
| configure_routes () | |
| Configure the API routes. | |
| configure_shim_route (RouteGroupInterface $group) | |
| Configure the Shim Route Middleware. | |
| configure_standard_route (RouteGroupInterface $group) | |
| Configure the Standard page Route Middleware. | |
| create_app (string $basepath='',) | |
| Create the configured SlimPHP Application. | |
| guess_basepath () | |
| Guess the basepath for the Router. | |
Protected Attributes | |
| App readonly App | $app |
| The SlimPHP App. | |
| core\router::__construct | ( | protected response_handler response_handler | $responsehandler, |
| protected route_loader_interface readonly route_loader_interface | $routeloader, | ||
| protected request_validator_interface request_validator_interface | $requestvalidator, | ||
| protected response_validator_interface response_validator_interface | $responsevalidator, | ||
| ?string | $basepath = null ) |
Create a new Router.
| response_handler | $responsehandler | |
| route_loader_interface | $routeloader | |
| request_validator_interface | $requestvalidator | |
| response_validator_interface | $responsevalidator | |
| null | string | $basepath |
| $routeloader | The router loader to use |
|
protected |
Configure the API Route Middleware.
| RouteGroupInterface | $group |
|
protected |
Configure the Shim Route Middleware.
| RouteGroupInterface | $group |
|
protected |
Configure the Standard page Route Middleware.
| RouteGroupInterface | $group |
|
protected |
Create the configured SlimPHP Application.
| string | $basepath | The base path of the Moodle instance |
| core\router::get_app | ( | ) |
Get the configured SlimPHP Application.
| App |
| core\router::get_response_factory | ( | ) |
Get the Response Factory for the Router.
| ResponseFactoryInterface |
|
protected |
Guess the basepath for the Router.
| string |
| core\router::handle_request | ( | ServerRequestInterface | $request | ) |
Handle the specified Request.
| ServerRequestInterface | $request |
| ResponseInterface |
| core\router::serve | ( | ) |
Serve the current request using global variables.
@codeCoverageIgnore