lychee/php/autoload.php

24 lines
482 B
PHP
Raw Normal View History

2014-04-02 17:30:58 +00:00
<?php
spl_autoload_register(function($class) {
2014-04-28 09:34:36 +00:00
$classPath = str_replace('Lychee\\', '', $class);
$classPath = str_replace('\\', DIRECTORY_SEPARATOR, $classPath);
$file = LYCHEE . 'php/' . $classPath . '.php';
2016-01-19 13:58:08 +00:00
if (file_exists($file)===true) require $file;
2014-04-28 09:34:36 +00:00
});
spl_autoload_register(function($class) {
$classPath = str_replace('\\', DIRECTORY_SEPARATOR, $class);
$file = LYCHEE . 'plugins/' . $classPath . '.php';
if (file_exists($file)===true) require $file;
});
2014-04-02 17:30:58 +00:00
?>