Beispiel #1
0
    function init(&$ParentController)
    {
        $this->__ParentController =& $ParentController;
        
        $this->__ParentController->_ssl_requirement ? $this->__ParentController->beforeFilter('_ensureProperProtocol') : false;

        if($this->__ParentController->_autoIncludePaginator){
            require_once(AK_LIB_DIR.DS.'AkActionController'.DS.'AkPaginator.php');
        }

        if(AK_WEB_REQUEST_CONNECT_TO_DATABASE_ON_INSTANTIATE){
            $this->__ParentController->__connectToDatabase();
        }

        if(AK_WEB_REQUEST_START_SESSION_ON_INSTANTIATE){
            $this->__ParentController->__startSession();
        }

        require_once(AK_LIB_DIR.DS.'AkRequest.php');
        $this->__ParentController->Request =& AkRequest();

        if(AK_WEB_REQUEST_ENABLE_INTERNATIONALIZATION_SUPPORT_ON_INSTANTIATE && AK_AVAILABLE_LOCALES != 'en'){
            $this->__ParentController->__enableInternationalizationSupport();
        }

        $this->__ParentController->__mapRoutes();
        
    }
Beispiel #2
0
 function dispatch()
 {
     $this->Request =& AkRequest();
     $this->Response =& AkResponse();
     $this->Controller =& $this->Request->recognize();
     $this->Controller->process($this->Request, $this->Response);
 }
Beispiel #3
0
 function dispatch()
 {
     AK_ENABLE_PROFILER &&  Ak::profile(__CLASS__.'::'.__FUNCTION__.'() call');
     $this->Request =& AkRequest();
     $this->Response =& AkResponse();
     $this->Controller =& $this->Request->recognize();
     AK_ENABLE_PROFILER &&  Ak::profile('Request::recognize() completed');
     $this->Controller->process($this->Request, $this->Response);
 }