Panacea * * @package Panacea * @author Tommy Montgomery * @since 2008-10-12 */ /** Bootstraps the NowhereConcave framework */ require_once 'NowhereConcave/bootstrap.php'; /** * Autoloader for Panacea * * @author Tommy Montgomery * @since 2008-10-12 * * @param string $className Name of the class to load */ function panacea_autoload($className) { $path = dirname(__FILE__); $file = ''; switch ($className) { case 'PanaceaControllerFactory': case 'PanaceaWikiController': case 'WikiViewFactory': case 'PanaceaDefaultController': case 'PanaceaViewFactory': $file = "$path/lib/$className.php"; break; case 'WikiPageView': $file = "$path/lib/views/wiki/$className.php"; break; case 'PanaceaView': case 'PanaceaHomeView': case 'PanaceaMainView': case 'PanaceaTemplateView': case 'PanaceaHeaderView': case 'PanaceaLogoView': case 'PanaceaMenuView': case 'PanaceaFooterView': case 'PanaceaWelcomeView': $file = "$path/lib/views/$className.php"; break; } if (!empty($file) && is_file($file)) { require_once $file; } } //registers panacea_autoload() as an autoload function if (spl_autoload_functions() === false || !in_array('panacea_autoload', spl_autoload_functions())) { spl_autoload_register('panacea_autoload'); } ?>