1 | <?php |
||
14 | class JsonDataNodeValidator |
||
15 | { |
||
16 | |||
17 | /** |
||
18 | * @param array $data data array to check for property key |
||
19 | * @param string $key value for the key being checked for |
||
20 | * @param string $type the type of key and/or the data being checked |
||
21 | * @return bool returns true if property is safe to write, false if overwrite will occur |
||
22 | * @throws DomainException throws exception if WP_DEBUG is true |
||
23 | */ |
||
24 | public function propertyNotSet(array $data, $key, $type = 'key') |
||
32 | |||
33 | |||
34 | /** |
||
35 | * @param string $key value for the key being checked for |
||
36 | * @param string $type the type of key and/or the data being checked |
||
37 | * @throws DomainException throws exception if WP_DEBUG is true |
||
38 | */ |
||
39 | public function overwriteError($key, $type) |
||
58 | |||
59 | |||
60 | /** |
||
61 | * @param string $property name for the key being checked for |
||
62 | * @param string $type the type of key and/or the data being checked |
||
63 | * @param bool $throw if true [default] and WP_DEBUG is also true, then will throw exceptions |
||
64 | * @return bool returns true if property is set, false if property is missing |
||
65 | * @throws DomainException throws exception if WP_DEBUG is true |
||
66 | */ |
||
67 | public function validateCriticalProperty($property, $type, $throw = true) |
||
89 | } |
||
90 |