| @@ 540-547 (lines=8) @@ | ||
| 537 | */ |
|
| 538 | private function validateSchemaType($type) |
|
| 539 | { |
|
| 540 | if (! (is_string($type) || is_array($type))) { |
|
| 541 | throw new InvalidArgumentException( |
|
| 542 | sprintf( |
|
| 543 | esc_html__('The incoming argument (%s) must be a string or an array.', 'event_espresso'), |
|
| 544 | print_r($type, true) |
|
| 545 | ) |
|
| 546 | ); |
|
| 547 | } |
|
| 548 | ||
| 549 | //validate allowable types. |
|
| 550 | //@link http://json-schema.org/latest/json-schema-core.html#rfc.section.4.2 |
|
| @@ 589-596 (lines=8) @@ | ||
| 586 | */ |
|
| 587 | private function validateSchemaFormat($format) |
|
| 588 | { |
|
| 589 | if (! is_string($format)) { |
|
| 590 | throw new InvalidArgumentException( |
|
| 591 | sprintf( |
|
| 592 | esc_html__('The incoming argument (%s) must be a string.', 'event_espresso'), |
|
| 593 | print_r($format, true) |
|
| 594 | ) |
|
| 595 | ); |
|
| 596 | } |
|
| 597 | ||
| 598 | //validate allowable format values |
|
| 599 | //@link http://json-schema.org/latest/json-schema-validation.html#rfc.section.7 |
|