|
| add ($key, $default, $type, $allow_null) |
| Defines a directive for configuration.
|
|
| addAlias ($key, $new_key) |
| Defines a directive alias for backwards compatibility.
|
|
| addAllowedValues ($key, $allowed) |
| Defines a set of allowed values for a directive.
|
|
| addValueAliases ($key, $aliases) |
| Defines a directive value alias.
|
|
| postProcess () |
| Replaces any stdClass that only has the type property with type integer.
|
|
|
static | instance ($prototype=null) |
| Retrieves an instance of the application-wide configuration definition.
|
|
static | makeFromSerial () |
| Unserializes the default ConfigSchema.
|
|
|
| $defaultPlist |
| The default property list.
|
|
| $defaults = array() |
| Defaults of the directives and namespaces.
|
|
| $info = array() |
| Definition of the directives.
|
|
◆ add()
HTMLPurifier_ConfigSchema::add |
( |
| $key, |
|
|
| $default, |
|
|
| $type, |
|
|
| $allow_null ) |
Defines a directive for configuration.
- Warning
- Will fail of directive's namespace is defined.
-
This method's signature is slightly different from the legacy define() static method! Beware!
- Parameters
-
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 |
◆ addAlias()
HTMLPurifier_ConfigSchema::addAlias |
( |
| $key, |
|
|
| $new_key ) |
Defines a directive alias for backwards compatibility.
- Parameters
-
string | $key | Directive that will be aliased |
string | $new_key | Directive that the alias will be to |
◆ addAllowedValues()
HTMLPurifier_ConfigSchema::addAllowedValues |
( |
| $key, |
|
|
| $allowed ) |
Defines a set of allowed values for a directive.
- Warning
- This is slightly different from the corresponding static method definition.
- Parameters
-
string | $key | Name of directive |
array | $allowed | Lookup array of allowed values |
◆ addValueAliases()
HTMLPurifier_ConfigSchema::addValueAliases |
( |
| $key, |
|
|
| $aliases ) |
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
-
string | $key | Name of Directive |
array | $aliases | Hash of aliased values to the real alias |
◆ instance()
static HTMLPurifier_ConfigSchema::instance |
( |
| $prototype = null | ) |
|
|
static |
Retrieves an instance of the application-wide configuration definition.
- Parameters
-
- Return values
-
◆ makeFromSerial()
static HTMLPurifier_ConfigSchema::makeFromSerial |
( |
| ) |
|
|
static |
Unserializes the default ConfigSchema.
- Return values
-
◆ $defaultPlist
HTMLPurifier_ConfigSchema::$defaultPlist |
The default property list.
Do not edit this property list. @type array
◆ $defaults
HTMLPurifier_ConfigSchema::$defaults = array() |
Defaults of the directives and namespaces.
@type array
- Note
- This shares the exact same structure as HTMLPurifier_Config\$conf
◆ $info
HTMLPurifier_ConfigSchema::$info = array() |
Definition of the directives.
The structure of this is:
array( 'Namespace' => array( 'Directive' => new stdClass(), ) )
The stdClass may have the following properties:
- If isAlias isn't set:
- type: Integer type of directive, see HTMLPurifier_VarParser for definitions
- allow_null: If set, this directive allows null values
- aliases: If set, an associative array of value aliases to real values
- allowed: If set, a lookup array of allowed (string) values
- If isAlias is set:
- namespace: Namespace this directive aliases to
- name: Directive name this directive aliases to
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. @type array
The documentation for this class was generated from the following file:
- lib/htmlpurifier/HTMLPurifier/ConfigSchema.php