ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
Interchange.php
Go to the documentation of this file.
1<?php
2
9{
10
15 public $name;
16
21 public $directives = array();
22
28 public function addDirective($directive)
29 {
30 if (isset($this->directives[$i = $directive->id->toString()])) {
31 throw new HTMLPurifier_ConfigSchema_Exception("Cannot redefine directive '$i'");
32 }
33 $this->directives[$i] = $directive;
34 }
35
40 public function validate()
41 {
42 $validator = new HTMLPurifier_ConfigSchema_Validator();
43 return $validator->validate($this);
44 }
45}
46
47// vim: et sw=4 sts=4
Exceptions related to configuration schema.
Definition: Exception.php:7
Generic schema interchange format that can be converted to a runtime representation (HTMLPurifier_Con...
Definition: Interchange.php:9
validate()
Convenience function to perform standard validation.
Definition: Interchange.php:40
$directives
Array of Directive ID => array(directive info) @type HTMLPurifier_ConfigSchema_Interchange_Directive[...
Definition: Interchange.php:21
addDirective($directive)
Adds a directive array to $directives.
Definition: Interchange.php:28
$name
Name of the application this schema is describing.
Definition: Interchange.php:15
Performs validations on HTMLPurifier_ConfigSchema_Interchange.
Definition: Validator.php:12