$defaults
$defaults
Defaults of the directives and namespaces.
Configuration definition, defines directives and their defaults.
$info
Definition of the directives.
The structure of this is:
array( 'Namespace' => array( 'Directive' => new stdClass(), ) )
The stdClass may have the following properties:
In certain degenerate cases, stdClass will actually be an integer. In that case, the value is equivalent to an stdClass with the type property set to the integer. If the integer is negative, type is equal to the absolute value of integer, and allow_null is true.
This class is friendly with HTMLPurifier_Config. If you need introspection about the schema, you're better of using the ConfigSchema_Interchange, which uses more memory but has much richer information.
add(string $key, mixed $default, string $type, bool $allow_null) : mixed
Defines a directive for configuration
string | $key | Name of directive |
mixed | $default | Default value of directive |
string | $type | Allowed type of the directive. See HTMLPurifier_VarParser::$types for allowed values |
bool | $allow_null | Whether or not to allow null values |
addValueAliases(string $key, array $aliases) : mixed
Defines a directive value alias.
Directive value aliases are convenient for developers because it lets them set a directive to several values and get the same result.
string | $key | Name of Directive |
array | $aliases | Hash of aliased values to the real alias |