autoload.php 730 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. * SabreDAV's PHP autoloader
  4. *
  5. * If you love the autoloader, and don't care as much about performance, this
  6. * file register a new autoload function using spl_autoload_register.
  7. *
  8. * @package Sabre
  9. * @subpackage DAV
  10. * @copyright Copyright (C) 2007-2012 Rooftop Solutions. All rights reserved.
  11. * @author Evert Pot (http://www.rooftopsolutions.nl/)
  12. * @license http://code.google.com/p/sabredav/wiki/License Modified BSD License
  13. */
  14. /**
  15. * @param string $className
  16. * @return void
  17. */
  18. function Sabre_autoload($className) {
  19. if(strpos($className,'Sabre_')===0) {
  20. include dirname(__FILE__) . '/' . str_replace('_','/',substr($className,6)) . '.php';
  21. }
  22. }
  23. spl_autoload_register('Sabre_autoload');