<?php
DEFINE("INTORTUS_AUTOLOADER_REGISTERED", true);
spl_autoload_register(function($className){
$classNSes = explode("\\", $className);
// the class being loaded is not of the intortus namespace
// this autoloader should not handle it
if($classNSes[0] !== "intortus"){
return false;
}
unset($classNSes[0]);
$path = dirname(__file__);
$pathToCls = implode(DIRECTORY_SEPARATOR, $classNSes);
require_once(strtolower($path.DIRECTORY_SEPARATOR.$pathToCls.".php"));
}, true, false);
?>
|