Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

(no description)

File Size: 176 lines (6 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

HTMLPurifier_ConfigSchema:: (8 methods):
  __construct()
  makeFromSerial()
  instance()
  add()
  addValueAliases()
  addAllowedValues()
  addAlias()
  postProcess()


Class: HTMLPurifier_ConfigSchema  - X-Ref

Configuration definition, defines directives and their defaults.

__construct()   X-Ref
Application-wide singleton


makeFromSerial()   X-Ref
Unserializes the default ConfigSchema.

return: HTMLPurifier_ConfigSchema

instance($prototype = null)   X-Ref
Retrieves an instance of the application-wide configuration definition.

param: HTMLPurifier_ConfigSchema $prototype
return: HTMLPurifier_ConfigSchema

add($key, $default, $type, $allow_null)   X-Ref
Defines a directive for configuration

param: string $key Name of directive
param: mixed $default Default value of directive
param: string $type Allowed type of the directive. See
param: bool $allow_null Whether or not to allow null values

addValueAliases($key, $aliases)   X-Ref
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.
param: string $key Name of Directive
param: array $aliases Hash of aliased values to the real alias

addAllowedValues($key, $allowed)   X-Ref
Defines a set of allowed values for a directive.

param: string $key Name of directive
param: array $allowed Lookup array of allowed values

addAlias($key, $new_key)   X-Ref
Defines a directive alias for backwards compatibility

param: string $key Directive that will be aliased
param: string $new_key Directive that the alias will be to

postProcess()   X-Ref
Replaces any stdClass that only has the type property with type integer.