Class Guzzle\Service\Description\SchemaValidator

InheritanceGuzzle\Service\Description\SchemaValidator
ImplementsGuzzle\Service\Description\ValidatorInterface

Default parameter validator

Protected Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$castIntegerToStringType bool Whether or not integers are converted to strings when an integer is received for a string input Guzzle\Service\Description\SchemaValidator
$errors array Errors encountered while validating Guzzle\Service\Description\SchemaValidator
$instance self Cache instance of the object Guzzle\Service\Description\SchemaValidator

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
determineType() From the allowable types, determine the type that the variable matches Guzzle\Service\Description\SchemaValidator
recursiveProcess() Recursively validate a parameter Guzzle\Service\Description\SchemaValidator

Property Details

$castIntegerToStringType protected property

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

protected bool $castIntegerToStringType null
$errors protected property

Errors encountered while validating

protected array $errors null
$instance protected static property

Cache instance of the object

protected static self $instance null

Method Details

__construct() public method

public void __construct ( $castIntegerToStringType true )
$castIntegerToStringType bool

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.
determineType() protected method

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

protected string|bool determineType ( $type, $value )
$type string

Parameter type

$value mixed

Value to determine the type

return string|bool

Returns the matching type on

getErrors() public method

Get the errors encountered while validating

public array getErrors ( )
getInstance() public static method

public static self getInstance ( )
recursiveProcess() protected method

Recursively validate a parameter

protected bool recursiveProcess ( Guzzle\Service\Description\Parameter $param, &$value, $path '', $depth 0 )
$param Guzzle\Service\Description\Parameter

API parameter being validated

$value mixed

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

$path string

Current validation path (used for error reporting)

$depth int

Current depth in the validation validate

return bool

Returns true if valid, or false if invalid

validate() public method

public void validate ( Guzzle\Service\Description\Parameter $param, &$value )
$param
$value