Generate error strings for data that doesn't match the specified Avro schema.
More...
Generate error strings for data that doesn't match the specified Avro schema.
This is very similar to AvroSchema::is_valid_datum(), but returns error messages instead of a boolean.
- Since
- 1.26
- Author
- Erik Bernhardson ebern.nosp@m.hard.nosp@m.son@w.nosp@m.ikim.nosp@m.edia..nosp@m.org
- Note
- © 2015 Erik Bernhardson and Wikimedia Foundation.
Definition at line 30 of file AvroValidator.php.
◆ getErrors()
static AvroValidator::getErrors |
( |
AvroSchema |
$schema, |
|
|
|
$datum |
|
) |
| |
|
static |
- Parameters
-
AvroSchema | $schema | The rules to conform to. |
mixed | $datum | The value to validate against $schema. |
- Returns
- string|string[] An error or list of errors in the provided $datum. When no errors exist the empty array is returned. PhanUndeclaredMethod,PhanUndeclaredProperty
Definition at line 39 of file AvroValidator.php.
◆ outOfRange()
static AvroValidator::outOfRange |
( |
|
$min, |
|
|
|
$max, |
|
|
|
$datum |
|
) |
| |
|
static |
◆ typeOf()
static AvroValidator::typeOf |
( |
|
$datum | ) |
|
|
static |
◆ wrongType()
static AvroValidator::wrongType |
( |
|
$expected, |
|
|
|
$datum |
|
) |
| |
|
static |
The documentation for this class was generated from the following file: