71        $contents = file_get_contents(HTMLPURIFIER_PREFIX . 
'/HTMLPurifier/ConfigSchema/schema.ser');
 
   72        $r = unserialize($contents);
 
   74            $hash = sha1($contents);
 
   75            trigger_error(
"Unserialization of configuration schema failed, sha1 of file was $hash", E_USER_ERROR);
 
   85    public static function instance($prototype = 
null)
 
   87        if ($prototype !== 
null) {
 
  108        $obj = 
new stdClass();
 
  111            $obj->allow_null = 
true;
 
  128        if (!isset($this->
info[
$key]->aliases)) {
 
  129            $this->
info[
$key]->aliases = array();
 
  131        foreach ($aliases as $alias => $real) {
 
  132            $this->
info[
$key]->aliases[$alias] = $real;
 
  145        $this->
info[
$key]->allowed = $allowed;
 
  156        $obj->key = $new_key;
 
  157        $obj->isAlias = 
true;
 
  166        foreach ($this->
info as 
$key => $v) {
 
  167            if (count((array) $v) == 1) {
 
  169            } elseif (count((array) $v) == 2 && isset($v->allow_null)) {
 
An exception for terminatinating execution or to throw for unit testing.
Configuration definition, defines directives and their defaults.
$defaultPlist
The default property list.
static instance($prototype=null)
Retrieves an instance of the application-wide configuration definition.
addValueAliases($key, $aliases)
Defines a directive value alias.
$info
Definition of the directives.
addAllowedValues($key, $allowed)
Defines a set of allowed values for a directive.
addAlias($key, $new_key)
Defines a directive alias for backwards compatibility.
static $singleton
Application-wide singleton @type HTMLPurifier_ConfigSchema.
postProcess()
Replaces any stdClass that only has the type property with type integer.
$defaults
Defaults of the directives and namespaces.
add($key, $default, $type, $allow_null)
Defines a directive for configuration.
static makeFromSerial()
Unserializes the default ConfigSchema.
Generic property list implementation.
static $types
Lookup table of allowed types.