Json
class Json
JSON Schema Validator
Implements schema draft version 03, as defined at http://json-schema.org
Properties
protected | $schemaDefinition | ||
protected stdClass | $schema |
Methods
Initialize validation object
Check format restriction
Validate object properties
Validate entity type
Check object type
Check number type
Check integer type
Check boolean type
Check string type
Check array type
Check null type
Check any type
Check minimum value
Check maximum value
Check exlusive minimum requirement
Check exclusive maximum requirement
Check value against regex pattern
Check string minimum length
Check string maximum length
Check array minimum items
Check array maximum items
Check array unique items
Check items restriction
Check disallowed entity type
Check divisibleby restriction
Details
at line 56
__construct(string $schemaFile)
Initialize validation object
at line 80
Json
validate(mixed $entity, string $entityName = null)
Validate schema object
at line 99
Json
checkFormat(mixed $entity, object $schema, string $entityName)
Check format restriction
at line 185
protected Json
validateProperties(object $entity, object $schema, string $entityName)
Validate object properties
at line 229
protected Json
validateType(mixed $entity, object $schema, string $entityName)
Validate entity type
at line 318
protected Json
checkTypeObject(mixed $entity, object $schema, string $entityName)
Check object type
at line 334
protected Json
checkTypeNumber(mixed $entity, object $schema, string $entityName)
Check number type
at line 357
protected Json
checkTypeInteger(mixed $entity, object $schema, string $entityName)
Check integer type
at line 380
protected Json
checkTypeBoolean(mixed $entity, object $schema, string $entityName)
Check boolean type
at line 394
protected Json
checkTypeString(mixed $entity, object $schema, string $entityName)
Check string type
at line 415
protected Json
checkTypeArray(mixed $entity, object $schema, string $entityName)
Check array type
at line 436
protected Json
checkTypeNull(mixed $entity, object $schema, string $entityName)
Check null type
at line 450
protected Json
checkTypeAny(mixed $entity, object $schema, string $entityName)
Check any type
at line 466
protected Json
checkMinimum(int|float $entity, object $schema, string $entityName)
Check minimum value
at line 486
protected Json
checkMaximum(int|float $entity, object $schema, string $entityName)
Check maximum value
at line 506
protected Json
checkExclusiveMinimum(int|float $entity, object $schema, string $entityName)
Check exlusive minimum requirement
at line 526
protected Json
checkExclusiveMaximum(int|float $entity, object $schema, string $entityName)
Check exclusive maximum requirement
at line 546
protected Json
checkPattern(string $entity, object $schema, string $entityName)
Check value against regex pattern
at line 566
protected Json
checkMinLength(string $entity, object $schema, string $entityName)
Check string minimum length
at line 586
protected Json
checkMaxLength(string $entity, object $schema, string $entityName)
Check string maximum length
at line 606
protected Json
checkMinItems(array $entity, object $schema, string $entityName)
Check array minimum items
at line 626
protected Json
checkMaxItems(array $entity, object $schema, string $entityName)
Check array maximum items
at line 646
protected Json
checkUniqueItems(array $entity, object $schema, string $entityName)
Check array unique items
at line 666
protected Json
checkEnum(array $entity, object $schema, string $entityName)
Check enum restriction
at line 702
protected Json
checkItems(array $entity, object $schema, string $entityName)
Check items restriction
at line 753
protected Json
checkDisallow(mixed $entity, object $schema, string $entityName)
Check disallowed entity type
at line 790
protected Json
checkDivisibleBy(int|float $entity, object $schema, string $entityName)
Check divisibleby restriction