Open Journal Systems
3.3.0
|
Public Member Functions | |
__construct ($castIntegerToStringType=true) | |
getErrors () | |
validate (Parameter $param, &$value) | |
Static Public Member Functions | |
static | getInstance () |
Protected Member Functions | |
determineType ($type, $value) | |
recursiveProcess (Parameter $param, &$value, $path='', $depth=0) | |
Protected Attributes | |
$castIntegerToStringType | |
$errors | |
Static Protected Attributes | |
static | $instance |
Default parameter validator
Definition at line 10 of file SchemaValidator.php.
Guzzle\Service\Description\SchemaValidator::__construct | ( | $castIntegerToStringType = true | ) |
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. |
Definition at line 44 of file SchemaValidator.php.
References Guzzle\Service\Description\SchemaValidator\$castIntegerToStringType.
|
protected |
From the allowable types, determine the type that the variable matches
string | $type | Parameter type |
mixed | $value | Value to determine the type |
Definition at line 271 of file SchemaValidator.php.
Referenced by Guzzle\Service\Description\SchemaValidator\recursiveProcess().
Guzzle\Service\Description\SchemaValidator::getErrors | ( | ) |
Get the errors encountered while validating
Implements Guzzle\Service\Description\ValidatorInterface.
Definition at line 67 of file SchemaValidator.php.
|
static |
Definition at line 31 of file SchemaValidator.php.
References Guzzle\Service\Description\SchemaValidator\$instance.
Referenced by Guzzle\Service\Command\AbstractCommand\getValidator().
|
protected |
Recursively validate a parameter
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 |
Definition at line 82 of file SchemaValidator.php.
References Guzzle\Service\Description\SchemaValidator\$instance, Guzzle\Service\Description\SchemaValidator\determineType(), Guzzle\Service\Description\Parameter\getAdditionalProperties(), Guzzle\Service\Description\Parameter\getDescription(), Guzzle\Service\Description\Parameter\getEnum(), Guzzle\Service\Description\Parameter\getInstanceOf(), Guzzle\Service\Description\Parameter\getItems(), Guzzle\Service\Description\Parameter\getMaximum(), Guzzle\Service\Description\Parameter\getMaxItems(), Guzzle\Service\Description\Parameter\getMaxLength(), Guzzle\Service\Description\Parameter\getMinimum(), Guzzle\Service\Description\Parameter\getMinItems(), Guzzle\Service\Description\Parameter\getMinLength(), Guzzle\Service\Description\Parameter\getName(), Guzzle\Service\Description\Parameter\getPattern(), Guzzle\Service\Description\Parameter\getProperties(), Guzzle\Service\Description\Parameter\getRequired(), Guzzle\Service\Description\Parameter\getStatic(), Guzzle\Service\Description\Parameter\getType(), and Guzzle\Service\Description\Parameter\getValue().
Referenced by Guzzle\Service\Description\SchemaValidator\validate().
Guzzle\Service\Description\SchemaValidator::validate | ( | Parameter | $param, |
& | $value | ||
) |
Validate a value against the acceptable types, regular expressions, minimum, maximums, instanceOf, enums, etc Add default and static values to the passed in variable. If the validation completes successfully, the input must be run correctly through the matching schema's filters attribute.
Parameter | $param | Schema that is being validated against the value |
mixed | $value | Value to validate and process. The value may change during this process. |
Implements Guzzle\Service\Description\ValidatorInterface.
Definition at line 49 of file SchemaValidator.php.
References Guzzle\Service\Description\SchemaValidator\recursiveProcess().
|
protected |
Definition at line 19 of file SchemaValidator.php.
Referenced by Guzzle\Service\Description\SchemaValidator\__construct().
|
protected |
Errors encountered while validating
Definition at line 25 of file SchemaValidator.php.
|
staticprotected |
Cache instance of the object
Definition at line 14 of file SchemaValidator.php.
Referenced by Guzzle\Service\Description\SchemaValidator\getInstance(), and Guzzle\Service\Description\SchemaValidator\recursiveProcess().