ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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
Performs validations on HTMLPurifier_ConfigSchema_Interchange.
Definition: Validator.php:11
$directives
Array of Directive ID => array(directive info) HTMLPurifier_ConfigSchema_Interchange_Directive[].
Definition: Interchange.php:21
Generic schema interchange format that can be converted to a runtime representation (HTMLPurifier_Con...
Definition: Interchange.php:8
Create styles array
The data for the language used.
Exceptions related to configuration schema.
Definition: Exception.php:6
$i
Definition: disco.tpl.php:19
$name
Name of the application this schema is describing.
Definition: Interchange.php:15
addDirective($directive)
Adds a directive array to $directives.
Definition: Interchange.php:28
validate()
Convenience function to perform standard validation.
Definition: Interchange.php:40