2008-01-27 05:31:06 +00:00
|
|
|
<?php
|
|
|
|
|
2008-02-17 18:21:45 +00:00
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
* Convenience file that registers autoload handler for HTML Purifier.
|
2008-12-06 07:28:20 +00:00
|
|
|
*
|
2008-02-25 21:21:12 +00:00
|
|
|
* @warning
|
|
|
|
* This autoloader does not contain the compatibility code seen in
|
|
|
|
* HTMLPurifier_Bootstrap; the user is expected to make any necessary
|
|
|
|
* changes to use this library.
|
2008-02-17 18:21:45 +00:00
|
|
|
*/
|
|
|
|
|
2008-01-27 05:31:06 +00:00
|
|
|
if (function_exists('spl_autoload_register')) {
|
2008-02-17 18:21:45 +00:00
|
|
|
spl_autoload_register(array('HTMLPurifierExtras', 'autoload'));
|
|
|
|
if (function_exists('__autoload')) {
|
|
|
|
// Be polite and ensure that userland autoload gets retained
|
|
|
|
spl_autoload_register('__autoload');
|
|
|
|
}
|
2008-01-27 05:31:06 +00:00
|
|
|
} elseif (!function_exists('__autoload')) {
|
2008-02-17 18:21:45 +00:00
|
|
|
function __autoload($class) {
|
|
|
|
return HTMLPurifierExtras::autoload($class);
|
|
|
|
}
|
2008-01-27 05:31:06 +00:00
|
|
|
}
|
2008-12-06 09:24:59 +00:00
|
|
|
|
|
|
|
// vim: et sw=4 sts=4
|