autoload.php 579 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. ###
  3. # @name Autoload
  4. # @author Tobias Reich
  5. # @copyright 2014 by Tobias Reich
  6. ###
  7. if (!defined('LYCHEE')) exit('Error: Direct access is not allowed!');
  8. function lycheeAutoloaderModules($class_name) {
  9. $file = LYCHEE . 'php/modules/' . $class_name . '.php';
  10. if (file_exists($file)!==false) require $file;
  11. }
  12. function lycheeAutoloaderAccess($class_name) {
  13. $file = LYCHEE . 'php/access/' . $class_name . '.php';
  14. if (file_exists($file)!==false) require $file;
  15. }
  16. spl_autoload_register('lycheeAutoloaderModules');
  17. spl_autoload_register('lycheeAutoloaderAccess');
  18. ?>