An interface for add HTTP Request validation. This class can validate parameters inside query, path, headers an body (watch below) <br/> You can assign multiple body type at the same time(for example a JSON schema together with a XML schema). This interface support: <ul> <li>application/x-www-form-urlencoded</li> <li>multipart/form-data</li> <li>application/xml</li> <li>application/json</li> </ul> Also you can add a form parameter for validation without care about content type of your request. For form parameters this interface support both "multipart/form-data" and "application/x-www-form-urlencoded" <br/> This interface allow extra parameters in the request, so it doesn't care if in a request there's a parameter without a specified validation rule <br/> If a parameter is flagged as an array, it will be validated also if the size of array is 1 element
package |
Default |
---|
__construct()
addCustomValidatorFunction( $arg0) : $this
CustomValidator
$this
this handler
addExpectedContentType( $arg0) : $this
string
$this
this handler
addFormParam( $arg0, $arg1, $arg2) : $this
string
string
boolean
$this
this handler
addFormParamsArray( $arg0, $arg1, $arg2) : $this
string
string
boolean
$this
this handler
addFormParamsArrayWithPattern( $arg0, $arg1, $arg2) : $this
string
string
boolean
$this
this handler
addFormParamWithCustomTypeValidator( $arg0, $arg1, $arg2, $arg3) : $this
string
ParameterTypeValidator
boolean
boolean
$this
this handler
addFormParamWithPattern( $arg0, $arg1, $arg2) : $this
string
string
boolean
$this
this handler
addHeaderParam( $arg0, $arg1, $arg2) : $this
string
string
boolean
$this
this handler
addHeaderParamWithCustomTypeValidator( $arg0, $arg1, $arg2, $arg3) : $this
string
ParameterTypeValidator
boolean
boolean
$this
this handler
addHeaderParamWithPattern( $arg0, $arg1, $arg2) : $this
string
string
boolean
$this
this handler
addJsonBodySchema( $arg0) : $this
string
$this
this handler
addMultipartRequiredFile( $arg0, $arg1) : $this
string
string
$this
this handler
addPathParam( $arg0, $arg1) : $this
string
string
$this
this handler
addPathParamWithCustomTypeValidator( $arg0, $arg1, $arg2) : $this
string
ParameterTypeValidator
boolean
$this
this handler
addPathParamWithPattern( $arg0, $arg1) : $this
string
string
$this
this handler
addQueryParam( $arg0, $arg1, $arg2) : $this
string
string
boolean
$this
this handler
addQueryParamsArray( $arg0, $arg1, $arg2) : $this
string
string
boolean
$this
this handler
addQueryParamsArrayWithPattern( $arg0, $arg1, $arg2) : $this
string
string
boolean
$this
this handler
addQueryParamWithCustomTypeValidator( $arg0, $arg1, $arg2, $arg3) : $this
string
ParameterTypeValidator
boolean
boolean
$this
this handler
addQueryParamWithPattern( $arg0, $arg1, $arg2) : $this
string
string
boolean
$this
this handler
addXMLBodySchema( $arg0) : $this
string
$this
this handler
create() : \io\vertx\jphp\ext\web\api\validation\HTTPRequestValidationHandler
\io\vertx\jphp\ext\web\api\validation\HTTPRequestValidationHandler
new HTTPRequestValidationHandler
handle( $arg0) : void
RoutingContext