Moodle PHP Documentation 5.1
Moodle 5.1dev (Build: 20250706) (a6b17d8f6bd)
core\router\request_validator Class Reference
Inheritance diagram for core\router\request_validator:
core\router\request_validator_interface

Public Member Functions

 validate_request (ServerRequestInterface $request,)
 Validate the request content.
 

Protected Member Functions

 validate_path (ServerRequestInterface $request, route $moodleroute, RouteInterface $slimroute,)
 Validate that the path arguments match those supplied in the route.
 
 validate_query (ServerRequestInterface $request, route $moodleroute,)
 Validate that the query parameters match those supplied in the route.
 
 validate_request_body (ServerRequestInterface $request, route $moodleroute,)
 Validate that the request body matches the schema.
 
 validate_request_header (ServerRequestInterface $request, route $moodleroute,)
 Validate that the request headers match the schema.
 

Member Function Documentation

◆ validate_path()

core\router\request_validator::validate_path ( ServerRequestInterface $request,
route $moodleroute,
RouteInterface $slimroute )
protected

Validate that the path arguments match those supplied in the route.

Parameters
ServerRequestInterface$request
route$moodleroute
RouteInterface$slimrouteThe route to validate.
Return values
ServerRequestInterface
Exceptions
coding_exception

◆ validate_query()

core\router\request_validator::validate_query ( ServerRequestInterface $request,
route $moodleroute )
protected

Validate that the query parameters match those supplied in the route.

Parameters
ServerRequestInterface$request
route$moodleroute
Return values
ServerRequestInterface

◆ validate_request()

core\router\request_validator::validate_request ( ServerRequestInterface $request)

Validate the request content.

Parameters
ServerRequestInterface$request
Return values
ServerRequestInterface

Implements core\router\request_validator_interface.

◆ validate_request_body()

core\router\request_validator::validate_request_body ( ServerRequestInterface $request,
route $moodleroute )
protected

Validate that the request body matches the schema.

Parameters
ServerRequestInterface$request
route$moodleroute
Return values
ServerRequestInterface

◆ validate_request_header()

core\router\request_validator::validate_request_header ( ServerRequestInterface $request,
route $moodleroute )
protected

Validate that the request headers match the schema.

Parameters
ServerRequestInterface$request
route$moodleroute
Return values
ServerRequestInterface

The documentation for this class was generated from the following file: