2008-01-21 18:43:59 +00:00
|
|
|
<?php
|
|
|
|
|
2008-02-17 18:21:45 +00:00
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
* Convenience file that registers autoload handler for HTML Purifier.
|
|
|
|
*/
|
|
|
|
|
2008-01-21 18:43:59 +00:00
|
|
|
if (function_exists('spl_autoload_register')) {
|
2008-02-17 18:21:45 +00:00
|
|
|
spl_autoload_register(array('HTMLPurifier_Bootstrap', 'autoload'));
|
|
|
|
if (function_exists('__autoload')) {
|
|
|
|
// Be polite and ensure that userland autoload gets retained
|
|
|
|
spl_autoload_register('__autoload');
|
|
|
|
}
|
2008-01-21 18:43:59 +00:00
|
|
|
} elseif (!function_exists('__autoload')) {
|
2008-02-17 18:21:45 +00:00
|
|
|
function __autoload($class) {
|
|
|
|
return HTMLPurifier_Bootstrap::autoload($class);
|
|
|
|
}
|
2008-01-21 18:43:59 +00:00
|
|
|
}
|