ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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) HTMLPurifier_ConfigSchema_Interchange_Directive[]. 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.

Parameters
HTMLPurifier_ConfigSchema_Interchange_Directive$directive
Exceptions
HTMLPurifier_ConfigSchema_Exception

Definition at line 28 of file Interchange.php.

References $i.

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  }
Exceptions related to configuration schema.
Definition: Exception.php:6
$i
Definition: disco.tpl.php:19

◆ validate()

HTMLPurifier_ConfigSchema_Interchange::validate ( )

Convenience function to perform standard validation.

Throws exception on failed validation.

Definition at line 40 of file Interchange.php.

41  {
42  $validator = new HTMLPurifier_ConfigSchema_Validator();
43  return $validator->validate($this);
44  }
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) HTMLPurifier_ConfigSchema_Interchange_Directive[].

Definition at line 21 of file Interchange.php.

◆ $name

HTMLPurifier_ConfigSchema_Interchange::$name

Name of the application this schema is describing.

string

Definition at line 15 of file Interchange.php.


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