HTMLPurifier_Config::getAll PHP Method

getAll() public method

Retrieves all directives, organized by namespace
public getAll ( )
    public function getAll()
    {
        if (!$this->finalized) {
            $this->autoFinalize();
        }
        $ret = array();
        foreach ($this->plist->squash() as $name => $value) {
            list($ns, $key) = explode('.', $name, 2);
            $ret[$ns][$key] = $value;
        }
        return $ret;
    }

Usage Example

Example #1
0
 /**
  * Give generator necessary configuration if possible
  * @param HTMLPurifier_Config $config
  */
 public function prepareGenerator($config)
 {
     $all = $config->getAll();
     $context = new HTMLPurifier_Context();
     $this->generator = new HTMLPurifier_Generator($config, $context);
 }