function __autoload($className) { $dispatcher = new Dispatcher($className); if (class_exists($className)) { return; } if ($dispatcher->isBom()) { require_once Configuration::getModelBomPath() . $className . '.php'; } if ($dispatcher->isDao()) { require_once Configuration::getModelDaoPath() . $className . '.php'; } if ($dispatcher->isCoreInterface()) { require_once Configuration::getInterfacePath() . $className . ".interface.php"; } if ($dispatcher->isCoreController()) { require_once Configuration::getControllersPath() . $className . ".php"; } if ($dispatcher->isCoreBom()) { require_once Configuration::getBusinessObjectModelsPath() . $className . ".php"; } if ($dispatcher->isCoreDao()) { require_once Configuration::getDatabaseAccessObjectPath() . $className . '.php'; } if ($dispatcher->isCoreConstant()) { require_once Configuration::getConstantsPath() . $className . ".constants.php"; } if ($dispatcher->isCoreHelper()) { require_once Configuration::getHelpersPath() . $className . ".helper.php"; } if ($dispatcher->isCoreAbstract()) { require_once Configuration::getAbstractPath() . $className . '.abstract.php'; } }