/**
  * Global controller entry, triggers all further actions, splits up admin- and portal loading
  *
  * @param bool $bitAdmin
  * @param string $strModule
  * @param string $strAction
  * @param string $strLanguageParam
  *
  * @return string
  */
 public function processRequest($bitAdmin, $strModule, $strAction, $strLanguageParam)
 {
     class_core_eventdispatcher::getInstance()->notifyGenericListeners(class_system_eventidentifier::EVENT_SYSTEM_REQUEST_STARTPROCESSING, array($bitAdmin, $strModule, $strAction, $strLanguageParam));
     if ($bitAdmin) {
         $strReturn = $this->processAdminRequest($strModule, $strAction, $strLanguageParam);
         $strReturn = $this->callScriptlets($strReturn, interface_scriptlet::BIT_CONTEXT_ADMIN);
     } else {
         $strReturn = $this->processPortalRequest($strModule, $strAction, $strLanguageParam);
         $strReturn = $this->callScriptlets($strReturn, interface_scriptlet::BIT_CONTEXT_PORTAL_PAGE);
     }
     $strReturn = $this->cleanupOutput($strReturn);
     $strReturn = $this->getDebugInfo($strReturn);
     $this->sendConditionalGetHeaders($strReturn);
     $this->objResponse->setStrContent($strReturn);
     class_core_eventdispatcher::getInstance()->notifyGenericListeners(class_system_eventidentifier::EVENT_SYSTEM_REQUEST_ENDPROCESSING, array($bitAdmin, $strModule, $strAction, $strLanguageParam));
     $this->objSession->sessionClose();
 }
Example #2
0
 /**
  * Starts the processing of the requests, fetches params and passes control to the request dispatcher
  * @return void
  */
 public function processRequest()
 {
     $strModule = class_carrier::getInstance()->getParam("module");
     $strAction = class_carrier::getInstance()->getParam("action");
     $strLanguageParam = class_carrier::getInstance()->getParam("language");
     $this->objResponse = class_response_object::getInstance();
     $this->objResponse->setStrResponseType(class_http_responsetypes::STR_TYPE_XML);
     $this->objResponse->setStrStatusCode(class_http_statuscodes::SC_OK);
     $objDispatcher = new class_request_dispatcher($this->objResponse);
     $objDispatcher->processRequest(_admin_, $strModule, $strAction, $strLanguageParam);
     if ($this->objResponse->getStrContent() == "") {
         class_response_object::getInstance()->setStrStatusCode(class_http_statuscodes::SC_BADREQUEST);
         $this->objResponse->setStrContent("<error>An error occurred, malformed request</error>");
     }
     if ($this->objResponse->getStrResponseType() == class_http_responsetypes::STR_TYPE_XML && self::$bitRenderXmlHeader) {
         $this->objResponse->setStrContent("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n" . $this->objResponse->getStrContent());
     }
 }