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-02-18 02:33:50 +00:00
|
|
|
if (function_exists('spl_autoload_register') && function_exists('spl_autoload_unregister')) {
|
|
|
|
// We need unregister for our pre-registering functionality
|
2008-02-18 01:11:17 +00:00
|
|
|
HTMLPurifier_Bootstrap::registerAutoload();
|
2008-02-17 18:21:45 +00:00
|
|
|
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
|
|
|
}
|
2008-12-06 09:24:59 +00:00
|
|
|
|
|
|
|
// vim: et sw=4 sts=4
|