Add benchmark script for ConfigSchema.
[htmlpurifier/rdancer.git] / library / HTMLPurifier / ConfigDef / Directive.php
blobcb1329108cf4994bff32e26ef6a51daa6cf2255f
1 <?php
3 /**
4 * Structure object containing definition of a directive.
5 * @note This structure does not contain default values
6 */
7 class HTMLPurifier_ConfigDef_Directive extends HTMLPurifier_ConfigDef
10 public $class = 'directive';
12 public function __construct(
13 $type = null,
14 $allow_null = null,
15 $allowed = null,
16 $aliases = null
17 ) {
18 if ( $type !== null) $this->type = $type;
19 if ( $allow_null !== null) $this->allow_null = $allow_null;
20 if ( $allowed !== null) $this->allowed = $allowed;
21 if ( $aliases !== null) $this->aliases = $aliases;
24 /**
25 * Allowed type of the directive. Values are:
26 * - string
27 * - istring (case insensitive string)
28 * - int
29 * - float
30 * - bool
31 * - lookup (array of value => true)
32 * - list (regular numbered index array)
33 * - hash (array of key => value)
34 * - mixed (anything goes)
36 public $type = 'mixed';
38 /**
39 * Is null allowed? Has no effect for mixed type.
40 * @bool
42 public $allow_null = false;
44 /**
45 * Lookup table of allowed values of the element, bool true if all allowed.
47 public $allowed = true;
49 /**
50 * Hash of value aliases, i.e. values that are equivalent.
52 public $aliases = array();