\GuzzleHttp\Command\GuzzleSchemaValidator

Default parameter validator

Summary

Methods
Properties
Constants
__construct()
validate()
getErrors()
No public properties found
No constants found
determineType()
recursiveProcess()
$castIntegerToStringType
$errors
N/A
No private methods found
No private properties found
N/A

Properties

$castIntegerToStringType

$castIntegerToStringType : bool

Whether or not integers are converted to strings when an integer is received for a string input

Type

bool

$errors

$errors : array

Type

array — Errors encountered while validating

Methods

__construct()

__construct(bool  $castIntegerToStringType = true) : mixed

Parameters

bool $castIntegerToStringType

Set to true to convert integers into strings when a required type is a string and the input value is an integer. Defaults to true.

Returns

mixed —

validate()

validate(\GuzzleHttp\Command\Guzzle\Parameter  $param,  $value) : bool

Parameters

\GuzzleHttp\Command\Guzzle\Parameter $param
$value

Returns

bool —

getErrors()

getErrors() : array

Get the errors encountered while validating

Returns

array —

determineType()

determineType(string|array  $type, mixed  $value) : string|false

From the allowable types, determine the type that the variable matches

Parameters

string|array $type

Parameter type

mixed $value

Value to determine the type

Returns

string|false —

Returns the matching type on

recursiveProcess()

recursiveProcess(\GuzzleHttp\Command\Guzzle\Parameter  $param, mixed  $value, string  $path = '', int  $depth) : bool

Recursively validate a parameter

Parameters

\GuzzleHttp\Command\Guzzle\Parameter $param

API parameter being validated

mixed $value

Value to validate and validate. The value may change during this validate.

string $path

Current validation path (used for error reporting)

int $depth

Current depth in the validation validate

Returns

bool —

Returns true if valid, or false if invalid