ILIAS  release_4-4 Revision
HTMLPurifier_ConfigSchema_Interchange Class Reference

Generic schema interchange format that can be converted to a runtime representation (HTMLPurifier_ConfigSchema) or HTML documentation. More...

+ Collaboration diagram for HTMLPurifier_ConfigSchema_Interchange:

Public Member Functions

 addDirective ($directive)
 Adds a directive array to $directives. More...
 
 validate ()
 Convenience function to perform standard validation. More...
 

Data Fields

 $name
 Name of the application this schema is describing. More...
 
 $directives = array()
 Array of Directive ID => array(directive info) More...
 

Detailed Description

Generic schema interchange format that can be converted to a runtime representation (HTMLPurifier_ConfigSchema) or HTML documentation.

Members are completely validated.

Definition at line 8 of file Interchange.php.

Member Function Documentation

◆ addDirective()

HTMLPurifier_ConfigSchema_Interchange::addDirective (   $directive)

Adds a directive array to $directives.

Definition at line 24 of file Interchange.php.

24  {
25  if (isset($this->directives[$i = $directive->id->toString()])) {
26  throw new HTMLPurifier_ConfigSchema_Exception("Cannot redefine directive '$i'");
27  }
28  $this->directives[$i] = $directive;
29  }
Exceptions related to configuration schema.
Definition: Exception.php:6

◆ validate()

HTMLPurifier_ConfigSchema_Interchange::validate ( )

Convenience function to perform standard validation.

Throws exception on failed validation.

Definition at line 35 of file Interchange.php.

35  {
36  $validator = new HTMLPurifier_ConfigSchema_Validator();
37  return $validator->validate($this);
38  }
Performs validations on HTMLPurifier_ConfigSchema_Interchange.
Definition: Validator.php:11

Field Documentation

◆ $directives

HTMLPurifier_ConfigSchema_Interchange::$directives = array()

Array of Directive ID => array(directive info)

Definition at line 19 of file Interchange.php.

◆ $name

HTMLPurifier_ConfigSchema_Interchange::$name

Name of the application this schema is describing.

Definition at line 14 of file Interchange.php.


The documentation for this class was generated from the following file: