Documentation

ResponseValidation
in package

Wrapper class for http requests/responses validation handling.

Table of Contents

Methods

cleanRequestData()  : array<string|int, mixed>
Checks and corrects the response object depending on the possible kinds of returns.
isValidAsyncResponse()  : bool
Checks if the asynchronous response is valid. Also checks if it is a valid synchronous response.
isValidSyncResponse()  : bool
Checks if the synchronous response is valid. Returns True if the response is valid.

Methods

cleanRequestData()

Checks and corrects the response object depending on the possible kinds of returns.

public static cleanRequestData(array<string|int, mixed> $response) : array<string|int, mixed>
Parameters
$response : array<string|int, mixed>

An endpoint response array.

Return values
array<string|int, mixed>

isValidAsyncResponse()

Checks if the asynchronous response is valid. Also checks if it is a valid synchronous response.

public static isValidAsyncResponse(array<string|int, mixed> $response) : bool

Returns True if the response is valid.

Parameters
$response : array<string|int, mixed>

A response array.

Return values
bool

isValidSyncResponse()

Checks if the synchronous response is valid. Returns True if the response is valid.

public static isValidSyncResponse(array<string|int, mixed> $response) : bool
Parameters
$response : array<string|int, mixed>

A response object.

Return values
bool

        
On this page

Search results