4 * Parses DEFAULT into _DEFAULT. Expects DEFAULT, _TYPE, _NULL and ID to exist.
6 class HTMLPurifier_ConfigSchema_Validator_ParseDefault
extends HTMLPurifier_ConfigSchema_Validator
9 public function validate(&$arr, $interchange) {
10 $parser = new HTMLPurifier_VarParser_Native(); // not configurable yet
12 $arr['_DEFAULT'] = $parser->parse($arr['DEFAULT'], $arr['_TYPE'], $arr['_NULL']);
13 } catch (HTMLPurifier_VarParserException
$e) {
14 throw new HTMLPurifier_ConfigSchema_Exception('Invalid type for default value in '. $arr['ID'] .': ' . $e->getMessage());