blob: 4717e1c890b42f94a4b11140b76b722a11450738 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
<?php
namespace phinde;
class Autoloader
{
public static function autoload($class)
{
$file = str_replace(array('\\', '_'), '/', $class)
. '.php';
if (stream_resolve_include_path($file)) {
require_once $file;
}
}
public static function register()
{
set_include_path(__DIR__ . '/../' . PATH_SEPARATOR . get_include_path());
spl_autoload_register('phinde\\Autoloader::autoload');
}
}
?>
|