Remove decorator pattern from validator; we'll only have one decorator which invokes...
[htmlpurifier.git] / library / HTMLPurifier / ConfigSchema / Validator / IdExists.php
blob2b12d2de6f0f358f8519eb4612051cab29d2691e
1 <?php
3 /**
4 * Validates that an ID field exists in the array
5 */
6 class HTMLPurifier_ConfigSchema_Validator_IdExists extends HTMLPurifier_ConfigSchema_Validator
9 public function validate(&$arr, $interchange, $type) {
10 if (!isset($arr['ID'])) {
11 throw new HTMLPurifier_ConfigSchema_Exception('ID must exist in ' . $type);