mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-11-10 07:38:41 +00:00
ec59062a9d
- Optimize ConfigSchema by removing non-essential runtime data. We can probably optimize even more by collapsing object structures to arrays. - Removed validation data from ConfigSchema; this will be reimplemented on Interchange - Implement a sane Interchange composite hierarchy that doesn't use arrays - Implement StringHash -> Interchange -> ConfigSchema, and rewrite maintenance file to account for this git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1615 48356398-32a2-884e-a903-53898d9a118a
36 lines
810 B
PHP
36 lines
810 B
PHP
<?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
|
|
{
|
|
|
|
/**
|
|
* Array of Namespace ID => array(namespace info)
|
|
*/
|
|
public $namespaces;
|
|
|
|
/**
|
|
* Array of Directive ID => array(directive info)
|
|
*/
|
|
public $directives;
|
|
|
|
/**
|
|
* Adds a namespace array to $namespaces
|
|
*/
|
|
public function addNamespace($namespace) {
|
|
$this->namespaces[$namespace->namespace] = $namespace;
|
|
}
|
|
|
|
/**
|
|
* Adds a directive array to $directives
|
|
*/
|
|
public function addDirective($directive) {
|
|
$this->directives[(string) $directive->id] = $directive;
|
|
}
|
|
|
|
}
|