lychee/php/autoload.php

29 lines
536 B
PHP
Raw Normal View History

2014-04-02 17:30:58 +00:00
<?php
###
2014-10-21 11:40:33 +00:00
# @name Autoload
2015-02-01 21:08:37 +00:00
# @copyright 2015 by Tobias Reich
###
2014-04-02 17:30:58 +00:00
2014-04-28 09:34:36 +00:00
if (!defined('LYCHEE')) exit('Error: Direct access is not allowed!');
2016-01-19 13:58:08 +00:00
function lycheeAutoloaderModules($class) {
2014-04-28 09:34:36 +00:00
2016-01-19 13:58:08 +00:00
$file = LYCHEE . 'php/modules/' . $class . '.php';
2016-01-19 13:58:08 +00:00
if (file_exists($file)===true) require $file;
2014-04-28 09:34:36 +00:00
}
2016-01-19 13:58:08 +00:00
function lycheeAutoloaderAccess($class) {
2014-04-28 09:34:36 +00:00
2016-01-19 13:58:08 +00:00
$file = LYCHEE . 'php/access/' . $class . '.php';
2016-01-19 13:58:08 +00:00
if (file_exists($file)===true) require $file;
2014-04-28 09:34:36 +00:00
2014-04-02 17:30:58 +00:00
}
2014-04-28 09:34:36 +00:00
spl_autoload_register('lycheeAutoloaderModules');
spl_autoload_register('lycheeAutoloaderAccess');
2014-04-02 17:30:58 +00:00
?>