Source of file Interchange.php
Size: 1,068 Bytes - Last Modified: 2021-12-23T10:07:55+00:00
/var/www/docs.ssmods.com/process/src/thirdparty/htmlpurifier-4.0.0-lite/library/HTMLPurifier/ConfigSchema/Interchange.php
12345678910111213141516171819202122232425262728293031323334353637383940414243 | <?php /** * Generic schema interchange format that can be converted to a runtime * representation (HTMLPurifier_ConfigSchema) or HTML documentation. Members * are completely validated. */ class HTMLPurifier_ConfigSchema_Interchange { /** * Name of the application this schema is describing. */ public $name; /** * Array of Directive ID => array(directive info) */ public $directives = array(); /** * Adds a directive array to $directives */ 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; } /** * Convenience function to perform standard validation. Throws exception * on failed validation. */ public function validate() { $validator = new HTMLPurifier_ConfigSchema_Validator(); return $validator->validate($this); } } // vim: et sw=4 sts=4 |