HummingBirdAnimeClient/app/base/autoloader.php
2015-05-22 12:36:26 -04:00

17 lines
288 B
PHP

<?php
function anime_autoloader($class) {
$dirs = ["base", "controllers", "models"];
foreach($dirs as $dir)
{
$file = realpath(__DIR__ . "/../{$dir}/{$class}.php");
if (file_exists($file))
{
require_once $file;
return;
}
}
}
spl_autoload_register('anime_autoloader');