diff --git a/php/autoload.php b/php/autoload.php index 6dad8c0..e7bede4 100644 --- a/php/autoload.php +++ b/php/autoload.php @@ -7,23 +7,20 @@ if (!defined('LYCHEE')) exit('Error: Direct access is not allowed!'); -function lycheeAutoloaderModules($class) { +spl_autoload_register(function($class) { $file = LYCHEE . 'php/modules/' . $class . '.php'; if (file_exists($file)===true) require $file; -} +}); -function lycheeAutoloaderAccess($class) { +spl_autoload_register(function($class) { $file = LYCHEE . 'php/access/' . $class . '.php'; if (file_exists($file)===true) require $file; -} - -spl_autoload_register('lycheeAutoloaderModules'); -spl_autoload_register('lycheeAutoloaderAccess'); +}); ?> \ No newline at end of file