3 * Simple class loader - when Doctrine Autoloader is not used
5 function defaultAutoload($className) {
7 $prefix = realpath(__DIR__
);
11 '/classes/Exception/',
13 '/classes/Presenters/',
16 '/classes/Structure/',
20 foreach($paths as $path) {
21 $filename = strtr($prefix.$path.$className.'.php',array('\\' => '/', '//' => '/'));
23 if(file_exists($filename)) {
28 throw new Exception('loader: Cannot load class '.$className);
31 spl_autoload_register(defaultAutoload
);