Default.php 943 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. * Horde_Autoloader_default
  4. *
  5. * Default autoloader definition that simply uses the include path with default
  6. * class path mappers.
  7. *
  8. * @author Bob Mckee <bmckee@bywires.com>
  9. * @author Chuck Hagenbuch <chuck@horde.org>
  10. * @category Horde
  11. * @package Autoloader
  12. */
  13. require_once 'Horde/Autoloader.php';
  14. require_once 'Horde/Autoloader/ClassPathMapper.php';
  15. require_once 'Horde/Autoloader/ClassPathMapper/Default.php';
  16. class Horde_Autoloader_Default extends Horde_Autoloader
  17. {
  18. public function __construct()
  19. {
  20. foreach (array_reverse(explode(PATH_SEPARATOR, get_include_path())) as $path) {
  21. if ($path == '.') { continue; }
  22. $path = realpath($path);
  23. if ($path) {
  24. $this->addClassPathMapper(new Horde_Autoloader_ClassPathMapper_Default($path));
  25. }
  26. }
  27. }
  28. }
  29. $__autoloader = new Horde_Autoloader_Default();
  30. $__autoloader->registerAutoloader();