- <?php
-
-
- class HTMLPurifier_ConfigSchema_Interchange
- {
-
-
-
- public $name;
-
-
-
- public $directives = array();
-
-
-
- public function addDirective($directive)
- {
- if (isset($this->directives[$i = $directive->id->toString()])) {
- throw new HTMLPurifier_ConfigSchema_Exception("Cannot redefine directive '$i'");
- }
- $this->directives[$i] = $directive;
- }
-
-
-
- public function validate()
- {
- $validator = new HTMLPurifier_ConfigSchema_Validator();
- return $validator->validate($this);
- }
- }
-
|