1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-08-04 21:28:06 +02:00

Convert HTMLPurifier_Config to use property list backend.

Signed-off-by: Edward Z. Yang <edwardzyang@thewritingpot.com>
This commit is contained in:
Edward Z. Yang
2009-02-02 18:42:23 -05:00
parent b31f280d41
commit b9094d5ec8
6 changed files with 71 additions and 36 deletions

View File

@@ -11,6 +11,11 @@ class HTMLPurifier_ConfigSchema {
*/
public $defaults = array();
/**
* The default property list. Do not edit this property list.
*/
public $defaultPlist;
/**
* Definition of the directives. The structure of this is:
*
@@ -47,6 +52,10 @@ class HTMLPurifier_ConfigSchema {
*/
static protected $singleton;
public function __construct() {
$this->defaultPlist = new HTMLPurifier_PropertyList();
}
/**
* Unserializes the default ConfigSchema.
*/
@@ -84,6 +93,7 @@ class HTMLPurifier_ConfigSchema {
if ($allow_null) $obj->allow_null = true;
$this->info[$namespace][$name] = $obj;
$this->defaults[$namespace][$name] = $default;
$this->defaultPlist->set("$namespace.$name", $default);
}
/**