Configuration definition, defines directives and their defaults.
Methods | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
public
|
__construct()
|
# | ||||||||
public
static
|
makeFromSerial(): HTMLPurifier_ConfigSchema
Unserializes the default ConfigSchema.
Unserializes the default ConfigSchema. |
# | ||||||||
public
static
|
instance(HTMLPurifier_ConfigSchema $prototype = null): HTMLPurifier_ConfigSchema
Retrieves an instance of the application-wide configuration definition.
Retrieves an instance of the application-wide configuration definition. |
# | ||||||||
public
|
add(string $key, mixed $default, string $type, bool $allow_null)
Defines a directive for configuration
Defines a directive for configuration Parameters
|
# | ||||||||
public
|
addValueAliases(string $key, array $aliases)
Defines a directive value alias.
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. Parameters
|
# | ||||||||
public
|
addAllowedValues(string $key, array $allowed)
Defines a set of allowed values for a directive.
Defines a set of allowed values for a directive. Parameters
|
# | ||||||||
public
|
addAlias(string $key, string $new_key)
Defines a directive alias for backwards compatibility
Defines a directive alias for backwards compatibility Parameters
|
# | ||||||||
public
|
postProcess()
Replaces any stdClass that only has the type property with type integer.
Replaces any stdClass that only has the type property with type integer. |
# |
Properties | |||
---|---|---|---|
public
|
|
$defaults = []
Defaults of the directives and namespaces.
Defaults of the directives and namespaces. |
# |
public
|
|
$defaultPlist
The default property list. Do not edit this property list.
The default property list. Do not edit this property list. |
# |
public
|
|
$info = []
Definition of the directives.
The structure of this is:
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. |
# |
protected
static
|
|
$singleton
Application-wide singleton
Application-wide singleton |
# |