summaryrefslogtreecommitdiffstats
path: root/Autoload.php.in
blob: 2f422fb07d5540cf43fb37712bc09ca8d979a99a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
/* inspired from Autoload.php from version 1.2 */

require_once 'File/Iterator/Autoload.php';
require_once 'PHP/Token/Stream/Autoload.php';
require_once 'Text/Template/Autoload.php';
require_once 'SebastianBergmann/Environment/autoload.php';
require_once 'SebastianBergmann/Version/autoload.php';

spl_autoload_register(
  function ($class)
  {
      static $classes = NULL;
      static $path = NULL;

      if ($classes === NULL) {
          $classes = array(
            ___CLASSLIST___
          );

          $path = __DIR__;
      }

      $cn = strtolower($class);

      if (isset($classes[$cn])) {
          require $path . $classes[$cn];
      }
  }
);