63 return unserialize(file_get_contents(HTMLPURIFIER_PREFIX .
'/HTMLPurifier/ConfigSchema/schema.ser'));
69 public static function instance($prototype = null) {
70 if ($prototype !== null) {
90 public function add($key, $default,
$type, $allow_null) {
91 $obj =
new stdclass();
93 if ($allow_null) $obj->allow_null =
true;
94 $this->info[$key] = $obj;
95 $this->defaults[$key] = $default;
96 $this->defaultPlist->set($key, $default);
109 if (!isset($this->info[$key]->aliases)) {
110 $this->info[$key]->aliases = array();
112 foreach (
$aliases as $alias => $real) {
113 $this->info[$key]->aliases[$alias] = $real;
126 $this->info[$key]->allowed = $allowed;
138 $obj->key = $new_key;
139 $obj->isAlias =
true;
140 $this->info[$key] = $obj;
147 foreach ($this->info as $key => $v) {
148 if (count((array) $v) == 1) {
149 $this->info[$key] = $v->type;
150 } elseif (count((array) $v) == 2 && isset($v->allow_null)) {
151 $this->info[$key] = -$v->type;