Location: PHPKode > projects > Breeze CMS - A PHP Content Manage System > libs/Ice/Dispatcher.class.php
<?php
ice_include("Ice_ClassLoader");

class Ice_Dispatcher
{
    function Ice_Dispatcher()
    {
        
    }
    
    function process()
    {
        ice_include("Ice_Controller_Action");
        ice_include("Ice_Model");
        
        ice_include("Ice_Http_Router");
        
        $router = Ice_Http_Router::getRouter();
        $registry = Ice_Registry::getInstance();

        $loader = Ice_ClassLoader::getInstance($registry->get("APP_PATH"));
        
        $controllerName = "Controller_" . ucfirst(strtolower($router["controller"]));
        $loader->load($controllerName);
        
        $controller = new $controllerName();
        $controller->setParam($router['params']);
        $controller->{strtolower($router["action"]) . "Action"}();
    }
}
Return current item: Breeze CMS - A PHP Content Manage System