Esempio n. 1
0
        $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());
        }
    }
    /**
     * If set to true, the output will be sent without the mandatory xml-head-element
     *
     * @param bool $bitSuppressXmlHeader
     * @return void
     */
    public static function setBitSuppressXmlHeader($bitSuppressXmlHeader)
    {
        self::$bitRenderXmlHeader = !$bitSuppressXmlHeader;
    }
}
//pass control
$objXML = new class_xml();
$objXML->processRequest();
$objXML->objResponse->sendHeaders();
$objXML->objResponse->sendContent();
class_core_eventdispatcher::getInstance()->notifyGenericListeners(class_system_eventidentifier::EVENT_SYSTEM_REQUEST_AFTERCONTENTSEND, array(class_request_entrypoint_enum::XML()));