6 * @note Many classes that could (although many times don't) use the
7 * configuration object make it a mandatory parameter. This is
8 * because a configuration object should always be forwarded,
9 * otherwise, you run the risk of missing a parameter and then
10 * being stumped when a configuration directive doesn't work.
12 class HTMLPurifier_Config
17 function HTMLPurifier_Config(&$definition) {
18 $this->conf
= $definition->info
; // set up the defaults
21 function createDefault() {
22 $definition =& HTMLPurifier_ConfigDef
::instance();
23 $config = new HTMLPurifier_Config($definition);
27 function get($namespace, $key) {
28 if (!isset($this->conf
[$namespace][$key])) {
29 trigger_error('Cannot retrieve value of undefined directive',
33 return $this->conf
[$namespace][$key];
36 function set($namespace, $key, $value) {
37 if (!isset($this->conf
[$namespace][$key])) {
38 trigger_error('Cannot set undefined directive to value',
42 $this->conf
[$namespace][$key] = $value;