At the moment, all of the documentation uses the "HTMLPurifier_Config" object to configure "HTMLPurifier":
$config = HTMLPurifier_Config::createDefault();
$config->set('Core.Encoding', 'UTF-8');
$config->set('HTML.Doctype', 'XHTML 1.0 Strict');
$config->set('Cache.DefinitionImpl', null);
$purifier = new HTMLPurifier($config);
But "HTMLPurifier" can also accepts a simple array:
$purifier = new HTMLPurifier([
'Core.Encoding' => 'UTF-8',
'HTML.Doctype' => 'XHTML 1.0 Strict',
'Cache.DefinitionImpl' => null,
]);
Does this second approach cause any problems?
The HTMLPurifier_Config::create() method does include an is_array() check, and uses $ret->loadArray($config).
I ask, because I've got a very simple/basic autoloader, and it works much better by starting with the "HTMLPurifier" class.