root/afridex/plugins/Flutter/purifier_lib/HTMLPurifier/ConfigDef/Directive.php @ 23

Revision 21, 1.4 kB (checked in by admin, 18 years ago)
Line 
1<?php
2
3/**
4 * Structure object containing definition of a directive.
5 * @note This structure does not contain default values
6 */
7class HTMLPurifier_ConfigDef_Directive extends HTMLPurifier_ConfigDef
8{
9   
10    public $class = 'directive';
11   
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;
22    }
23   
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)
35     */
36    public $type = 'mixed';
37   
38    /**
39     * Is null allowed? Has no effect for mixed type.
40     * @bool
41     */
42    public $allow_null = false;
43   
44    /**
45     * Lookup table of allowed values of the element, bool true if all allowed.
46     */
47    public $allowed = true;
48   
49    /**
50     * Hash of value aliases, i.e. values that are equivalent.
51     */
52    public $aliases = array();
53   
54}
55
Note: See TracBrowser for help on using the browser.