registerNamespace('Icinga', $libaryPath . '/Icinga'); $loader->registerNamespace('Icinga\\Form', $applicationPath . '/forms'); $modules = scandir($modulePath); foreach ($modules as $module) { if ($module === '.' || $module === '..') { continue; } $baseNs = 'Icinga\\Module\\' . ucfirst($module); $moduleLibraryPath = $modulePath . '/' . $module . '/library'; if (is_dir($moduleLibraryPath)) { $loader->registerNamespace($baseNs, $moduleLibraryPath); } $moduleTestPath = $modulePath . '/' . $module . '/test'; if (is_dir($moduleTestPath)) { $testNs = $baseNs .= '\\Test'; $loader->registerNamespace($testNs, $moduleTestPath); } $moduleFormPath = $modulePath . '/' . $module . '/application/forms'; if (is_dir($moduleFormPath)) { $formNs = $baseNs .= '\\Form'; $loader->registerNamespace($formNs, $moduleFormPath); } } $loader->register(); require_once 'Zend/Loader/Autoloader.php'; \Zend_Loader_Autoloader::getInstance(); } } TestInit::bootstrap();