commands to show readme and extract config template
[bdrem.git] / src / bdrem / Autoloader.php
1 <?php
2 namespace bdrem;
3
4 class Autoloader
5 {
6     public function load($class)
7     {
8         $file = strtr($class, '_\\', '//') . '.php';
9         if (stream_resolve_include_path($file)) {
10             require $file;
11         }
12     }
13
14     public static function register()
15     {
16         set_include_path(
17             get_include_path() . PATH_SEPARATOR . __DIR__ . '/../'
18         );
19         spl_autoload_register(array(new self(), 'load'));
20     }
21 }
22 ?>