\HTMLPurifier_Config
Configuration object that triggers customizable behavior.
Synopsis
class HTMLPurifier_Config
{
- // members
- public string $version = '4.2.0';
- public boolean $autoFinalize = true;
- protected array $serials = ;
- protected $serial;
- protected $parser;
- public $def;
- protected $definitions;
- protected boolean $finalized = false;
- protected $plist;
- private $aliasMode;
- public boolean $chatty = true;
- private $lock;
- // methods
- public void __construct()
- public static Configured create()
- public static HTMLPurifier_Config inherit()
- public static Default createDefault()
- public void get()
- public void getBatch()
- public void getBatchSerial()
- public void getSerial()
- public void getAll()
- public void set()
- private void _listify()
- public void getHTMLDefinition()
- public void getCSSDefinition()
- public void getDefinition()
- public void loadArray()
- public static void getAllowedDirectivesForForm()
- public static void loadArrayFromForm()
- public void mergeArrayFromForm()
- public static void prepareArrayFromForm()
- public void loadIni()
- public void isFinalized()
- public void autoFinalize()
- public void finalize()
- protected void triggerError()
- public void serialize()
Tasks
Line | Task |
---|---|
17+ | Reconsider some of the public member variables |
Members
private
-
$aliasMode
Whether or not a set is taking place due to an alias lookup. -
$lock
Current lock; only gets to this namespace are allowed.
protected
-
$definitions
Indexed array of definitions -
$finalized
Bool indicator whether or not config is finalized -
$parser
Parser for variables -
$plist
Property list containing configuration directives. -
$serial
Serial for entire configuration object -
$serials
Namespace indexed array of serials for specific namespaces (see getSerial() for more info).
public
-
$autoFinalize
Bool indicator whether or not to automatically finalize the object if a read operation is done -
$chatty
Set to false if you do not want line and file numbers in errors (useful when unit testing) -
$def
Reference HTMLPurifier_ConfigSchema for value checking -
$version
HTML Purifier's version
Methods
private
- _listify() — Convenience function for error reporting
protected
- triggerError() — Produces a nicely formatted error message by supplying the stack frame information from two levels up and OUTSIDE of HTMLPurifier_Config.
public
- __construct()
- autoFinalize() — Finalizes configuration only if auto finalize is on and not already finalized
- create() — Convenience constructor that creates a config object based on a mixed var
- createDefault() — Convenience constructor that creates a default configuration object.
- finalize() — Finalizes a configuration object, prohibiting further change
- get() — Retreives a value from the configuration.
- getAll() — Retrieves all directives, organized by namespace
- getAllowedDirectivesForForm() — Returns a list of array(namespace, directive) for all directives that are allowed in a web-form context as per an allowed namespaces/directives list.
- getBatch() — Retreives an array of directives to values from a given namespace
- getBatchSerial() — Returns a md5 signature of a segment of the configuration object that uniquely identifies that particular configuration
- getCSSDefinition() — Retrieves object reference to the CSS definition
- getDefinition() — Retrieves a definition
- getHTMLDefinition() — Retrieves object reference to the HTML definition.
- getSerial() — Returns a md5 signature for the entire configuration object that uniquely identifies that particular configuration
- inherit() — Creates a new config object that inherits from a previous one.
- isFinalized() — Checks whether or not the configuration object is finalized.
- loadArray() — Loads configuration values from an array with the following structure: Namespace.Directive => Value
- loadArrayFromForm() — Loads configuration values from $_GET/$_POST that were posted via ConfigForm
- loadIni() — Loads configuration values from an ini file
- mergeArrayFromForm() — Merges in configuration values from $_GET/$_POST to object. NOT STATIC.
- prepareArrayFromForm() — Prepares an array from a form into something usable for the more strict parts of HTMLPurifier_Config
- serialize() — Returns a serialized form of the configuration object that can be reconstituted.
- set() — Sets a value to configuration.