| Conditions | 6 |
| Paths | 4 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | public static function registerDirectory($dirName) { |
||
| 11 | $di = new DirectoryIterator($dirName); |
||
| 12 | foreach ($di as $file) { |
||
| 13 | if ($file->isDir() && !$file->isLink() && !$file->isDot()) { |
||
| 14 | // recurse into directories other than a few special ones |
||
| 15 | self::registerDirectory($file->getPathname()); |
||
| 16 | } elseif (substr($file->getFilename(), -4) === '.php') { |
||
| 17 | // save the class name / path of a .php file found |
||
| 18 | $className = substr($file->getFilename(), 0, -4); |
||
| 19 | AutoLoader::registerClass($className, $file->getPathname()); |
||
| 20 | } |
||
| 21 | } |
||
| 22 | } |
||
| 23 | |||
| 36 | spl_autoload_register(array('AutoLoader', 'loadClass')); |