2007-02-05 03:22:32 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Structure object containing definition of a directive.
|
|
|
|
* @note This structure does not contain default values
|
|
|
|
*/
|
|
|
|
class HTMLPurifier_ConfigDef_Directive extends HTMLPurifier_ConfigDef
|
|
|
|
{
|
|
|
|
|
2007-11-25 02:24:39 +00:00
|
|
|
public $class = 'directive';
|
2007-02-05 03:22:32 +00:00
|
|
|
|
2007-11-29 04:29:51 +00:00
|
|
|
public function __construct(
|
2007-02-05 03:22:32 +00:00
|
|
|
$type = null,
|
|
|
|
$allow_null = null,
|
|
|
|
$allowed = null,
|
|
|
|
$aliases = null
|
|
|
|
) {
|
2008-01-27 20:21:31 +00:00
|
|
|
if ( $type !== null) $this->type = $type;
|
|
|
|
if ( $allow_null !== null) $this->allow_null = $allow_null;
|
|
|
|
if ( $allowed !== null) $this->allowed = $allowed;
|
|
|
|
if ( $aliases !== null) $this->aliases = $aliases;
|
2007-02-05 03:22:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Allowed type of the directive. Values are:
|
|
|
|
* - string
|
|
|
|
* - istring (case insensitive string)
|
|
|
|
* - int
|
|
|
|
* - float
|
|
|
|
* - bool
|
|
|
|
* - lookup (array of value => true)
|
|
|
|
* - list (regular numbered index array)
|
|
|
|
* - hash (array of key => value)
|
|
|
|
* - mixed (anything goes)
|
|
|
|
*/
|
2007-11-25 02:24:39 +00:00
|
|
|
public $type = 'mixed';
|
2007-02-05 03:22:32 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Is null allowed? Has no effect for mixed type.
|
|
|
|
* @bool
|
|
|
|
*/
|
2007-11-25 02:24:39 +00:00
|
|
|
public $allow_null = false;
|
2007-02-05 03:22:32 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Lookup table of allowed values of the element, bool true if all allowed.
|
|
|
|
*/
|
2007-11-25 02:24:39 +00:00
|
|
|
public $allowed = true;
|
2007-02-05 03:22:32 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Hash of value aliases, i.e. values that are equivalent.
|
|
|
|
*/
|
2007-11-25 02:24:39 +00:00
|
|
|
public $aliases = array();
|
2007-02-05 03:22:32 +00:00
|
|
|
|
2007-06-24 22:22:00 +00:00
|
|
|
/**
|
|
|
|
* Advisory list of directive aliases, i.e. other directives that
|
|
|
|
* redirect here
|
|
|
|
*/
|
2007-11-25 02:24:39 +00:00
|
|
|
public $directiveAliases = array();
|
2007-06-24 22:22:00 +00:00
|
|
|
|
2007-02-05 03:22:32 +00:00
|
|
|
}
|
|
|
|
|