autoload.php 625 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. /**
  3. * This file registers a new autoload function using spl_autoload_register.
  4. *
  5. * @package Dropbox
  6. * @copyright Copyright (C) 2010 Rooftop Solutions. All rights reserved.
  7. * @author Evert Pot (http://www.rooftopsolutions.nl/)
  8. * @license http://code.google.com/p/dropbox-php/wiki/License MIT
  9. */
  10. /**
  11. * Autoloader function
  12. *
  13. * @param $className string
  14. * @return void
  15. */
  16. function Dropbox_autoload($className) {
  17. if(strpos($className,'Dropbox_')===0) {
  18. include dirname(__FILE__) . '/' . str_replace('_','/',substr($className,8)) . '.php';
  19. }
  20. }
  21. spl_autoload_register('Dropbox_autoload');