2008-03-01 17:06:23 +00:00
|
|
|
<?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)
|
|
|
|
*/
|
2008-03-22 20:26:04 +00:00
|
|
|
public $namespaces = array();
|
2008-03-01 17:06:23 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Array of Directive ID => array(directive info)
|
|
|
|
*/
|
2008-03-22 20:26:04 +00:00
|
|
|
public $directives = array();
|
2008-03-01 17:06:23 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Adds a namespace array to $namespaces
|
|
|
|
*/
|
2008-03-22 03:55:59 +00:00
|
|
|
public function addNamespace($namespace) {
|
|
|
|
$this->namespaces[$namespace->namespace] = $namespace;
|
2008-03-01 17:06:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Adds a directive array to $directives
|
|
|
|
*/
|
2008-03-22 03:55:59 +00:00
|
|
|
public function addDirective($directive) {
|
2008-03-22 20:26:04 +00:00
|
|
|
$this->directives[$directive->id->__toString()] = $directive;
|
2008-03-04 05:21:04 +00:00
|
|
|
}
|
|
|
|
|
2008-03-01 17:06:23 +00:00
|
|
|
}
|