Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 3.9.x will end* 10 May 2021 (12 months).
  • Bug fixes for security issues in 3.9.x will end* 8 May 2023 (36 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are 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.