ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
HTMLPurifier_ConfigSchema_Builder_ConfigSchema Class Reference

Converts HTMLPurifier_ConfigSchema_Interchange to our runtime representation used to perform checks on user configuration. More...

+ Collaboration diagram for HTMLPurifier_ConfigSchema_Builder_ConfigSchema:

Public Member Functions

 build ($interchange)
 

Detailed Description

Converts HTMLPurifier_ConfigSchema_Interchange to our runtime representation used to perform checks on user configuration.

Definition at line 7 of file ConfigSchema.php.

Member Function Documentation

◆ build()

HTMLPurifier_ConfigSchema_Builder_ConfigSchema::build (   $interchange)
Parameters
HTMLPurifier_ConfigSchema_Interchange$interchange
Returns
HTMLPurifier_ConfigSchema

Definition at line 14 of file ConfigSchema.php.

References $d.

15  {
16  $schema = new HTMLPurifier_ConfigSchema();
17  foreach ($interchange->directives as $d) {
18  $schema->add(
19  $d->id->key,
20  $d->default,
21  $d->type,
22  $d->typeAllowsNull
23  );
24  if ($d->allowed !== null) {
25  $schema->addAllowedValues(
26  $d->id->key,
27  $d->allowed
28  );
29  }
30  foreach ($d->aliases as $alias) {
31  $schema->addAlias(
32  $alias->key,
33  $d->id->key
34  );
35  }
36  if ($d->valueAliases !== null) {
37  $schema->addValueAliases(
38  $d->id->key,
39  $d->valueAliases
40  );
41  }
42  }
43  $schema->postProcess();
44  return $schema;
45  }
Configuration definition, defines directives and their defaults.
Definition: ConfigSchema.php:6
for($i=6; $i< 13; $i++) for($i=1; $i< 13; $i++) $d
Definition: date.php:296

The documentation for this class was generated from the following file: