ILIAS
eassessment Revision 61809
|
Configuration definition, defines directives and their defaults. More...
Public Member Functions | |
__construct () | |
add ($key, $default, $type, $allow_null) | |
Defines a directive for configuration. | |
addValueAliases ($key, $aliases) | |
Defines a directive value alias. | |
addAllowedValues ($key, $allowed) | |
Defines a set of allowed values for a directive. | |
addAlias ($key, $new_key) | |
Defines a directive alias for backwards compatibility. | |
postProcess () | |
Replaces any stdclass that only has the type property with type integer. |
Static Public Member Functions | |
static | makeFromSerial () |
Unserializes the default ConfigSchema. | |
static | instance ($prototype=null) |
Retrieves an instance of the application-wide configuration definition. |
Data Fields | |
$defaults = array() | |
Defaults of the directives and namespaces. | |
$defaultPlist | |
The default property list. | |
$info = array() | |
Definition of the directives. |
Static Protected Attributes | |
static | $singleton |
Application-wide singleton. |
Configuration definition, defines directives and their defaults.
Definition at line 6 of file ConfigSchema.php.
HTMLPurifier_ConfigSchema::__construct | ( | ) |
Definition at line 55 of file ConfigSchema.php.
HTMLPurifier_ConfigSchema::add | ( | $key, | |
$default, | |||
$type, | |||
$allow_null | |||
) |
Defines a directive for configuration.
$namespace | Namespace the directive is in |
$name | Key of directive |
$default | Default value of directive |
$type | Allowed type of the directive. See HTMLPurifier_DirectiveDef::$type for allowed values |
$allow_null | Whether or not to allow null values |
Definition at line 90 of file ConfigSchema.php.
References $type, and HTMLPurifier_VarParser\$types.
HTMLPurifier_ConfigSchema::addAlias | ( | $key, | |
$new_key | |||
) |
Defines a directive alias for backwards compatibility.
$namespace | |
$name | Directive that will be aliased |
$new_namespace | |
$new_name | Directive that the alias will be to |
Definition at line 136 of file ConfigSchema.php.
HTMLPurifier_ConfigSchema::addAllowedValues | ( | $key, | |
$allowed | |||
) |
Defines a set of allowed values for a directive.
$namespace | Namespace of directive |
$name | Name of directive |
$allowed | Lookup array of allowed values |
Definition at line 125 of file ConfigSchema.php.
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.
$namespace | Directive's namespace |
$name | Name of Directive |
$aliases | Hash of aliased values to the real alias |
Definition at line 108 of file ConfigSchema.php.
References $aliases.
|
static |
Retrieves an instance of the application-wide configuration definition.
Definition at line 69 of file ConfigSchema.php.
References $singleton, and makeFromSerial().
Referenced by HTMLPurifier_Config\createDefault(), and HTMLPurifier_Config\getAllowedDirectivesForForm().
|
static |
Unserializes the default ConfigSchema.
Definition at line 62 of file ConfigSchema.php.
Referenced by instance().
HTMLPurifier_ConfigSchema::postProcess | ( | ) |
Replaces any stdclass that only has the type property with type integer.
Definition at line 146 of file ConfigSchema.php.
HTMLPurifier_ConfigSchema::$defaultPlist |
The default property list.
Do not edit this property list.
Definition at line 17 of file ConfigSchema.php.
HTMLPurifier_ConfigSchema::$defaults = array() |
Defaults of the directives and namespaces.
Definition at line 12 of file ConfigSchema.php.
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:
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.
Definition at line 48 of file ConfigSchema.php.
|
staticprotected |
Application-wide singleton.
Definition at line 53 of file ConfigSchema.php.
Referenced by instance().