Removing PHPCI's custom autoloader in favour of Composer autoloader.
Closes #661
This commit is contained in:
parent
bd47766d63
commit
b8421898da
4 changed files with 786 additions and 236 deletions
|
|
@ -10,23 +10,6 @@
|
|||
// Let PHP take a guess as to the default timezone, if the user hasn't set one:
|
||||
date_default_timezone_set(@date_default_timezone_get());
|
||||
|
||||
// Set up a basic autoloader for PHPCI:
|
||||
$autoload = function ($class) {
|
||||
$file = str_replace(array('\\', '_'), '/', $class);
|
||||
$file .= '.php';
|
||||
|
||||
if (substr($file, 0, 1) == '/') {
|
||||
$file = substr($file, 1);
|
||||
}
|
||||
|
||||
if (is_file(dirname(__DIR__) . '/' . $file)) {
|
||||
include(dirname(__DIR__) . '/' . $file);
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
spl_autoload_register($autoload, true, true);
|
||||
|
||||
// Load Composer autoloader:
|
||||
require_once(dirname(__DIR__) . '/vendor/autoload.php');
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue