Skip to content
Snippets Groups Projects
Commit 4ea404e4 authored by Michael Fairchild's avatar Michael Fairchild
Browse files

update the autoload function to include the vendor libs

parent d3967379
No related branches found
No related tags found
No related merge requests found
<?php
function __autoload($class)
function autoload($class)
{
$file = dirname(__FILE__).'/src/'.str_replace('_', DIRECTORY_SEPARATOR, $class).'.php';
if (file_exists($file)) {
require $file;
return true;
}
return false;
$class = str_replace(array('_', '\\'), '/', $class);
include $class . '.php';
}
spl_autoload_register('__autoload');
spl_autoload_register('autoload');
set_include_path(__DIR__ . '/src' . PATH_SEPARATOR . __DIR__ . '/vendor/php');
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment