HTMLPurifierExtras.autoload.php 734 B

12345678910111213141516171819202122232425
  1. <?php
  2. /**
  3. * @file
  4. * Convenience file that registers autoload handler for HTML Purifier.
  5. *
  6. * @warning
  7. * This autoloader does not contain the compatibility code seen in
  8. * HTMLPurifier_Bootstrap; the user is expected to make any necessary
  9. * changes to use this library.
  10. */
  11. if (function_exists('spl_autoload_register')) {
  12. spl_autoload_register(array('HTMLPurifierExtras', 'autoload'));
  13. if (function_exists('__autoload')) {
  14. // Be polite and ensure that userland autoload gets retained
  15. spl_autoload_register('__autoload');
  16. }
  17. } elseif (!function_exists('__autoload')) {
  18. function __autoload($class) {
  19. return HTMLPurifierExtras::autoload($class);
  20. }
  21. }
  22. // vim: et sw=4 sts=4