當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CMain::finalActions方法代碼示例

本文整理匯總了PHP中CMain::finalActions方法的典型用法代碼示例。如果您正苦於以下問題:PHP CMain::finalActions方法的具體用法?PHP CMain::finalActions怎麽用?PHP CMain::finalActions使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CMain的用法示例。


在下文中一共展示了CMain::finalActions方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: end

 /**
  * Terminates controller and application.
  * This method replaces "die()" or "exit()" and ensures life cycle of application.
  * @return void
  */
 protected function end()
 {
     $this->logDebugInfo();
     /** @noinspection PhpUndefinedClassInspection */
     \CMain::finalActions();
     die;
 }
開發者ID:mrdeadmouse,項目名稱:u136006,代碼行數:12,代碼來源:controller.php

示例2: end

 protected function end($terminate = true)
 {
     Diag::getInstance()->logDebugInfo($this->getName());
     if ($terminate) {
         /** @noinspection PhpUndefinedClassInspection */
         \CMain::finalActions();
         die;
     }
 }
開發者ID:DarneoStudio,項目名稱:bitrix,代碼行數:9,代碼來源:basecomponent.php

示例3: showJsonAnswer

 protected function showJsonAnswer($result)
 {
     if (!defined("PUBLIC_AJAX_MODE")) {
         define("PUBLIC_AJAX_MODE", true);
     }
     if (!defined("NO_KEEP_STATISTIC")) {
         define("NO_KEEP_STATISTIC", "Y");
     }
     if (!defined("NO_AGENT_STATISTIC")) {
         define("NO_AGENT_STATISTIC", "Y");
     }
     if (!defined("NO_AGENT_CHECK")) {
         define("NO_AGENT_CHECK", true);
     }
     if (!defined("DisableEventsCheck")) {
         define("DisableEventsCheck", true);
     }
     require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php";
     $GLOBALS["APPLICATION"]->RestartBuffer();
     while (ob_end_clean()) {
     }
     $version = IsIE();
     if (!(0 < $version && $version < 10)) {
         header('Content-Type:application/json; charset=UTF-8');
     }
     echo Json::encode($result);
     \CMain::finalActions();
     die;
 }
開發者ID:DarneoStudio,項目名稱:bitrix,代碼行數:29,代碼來源:uploader.php

示例4: intval

            $arRes = CSocNetLogComponent::getCommentByRequest($comment_id, $post_id, "edit");
            if ($arRes) {
                $arResult["id"] = intval($arRes["ID"]);
                $arResult["message"] = str_replace("<br />", "\n", $arRes["MESSAGE"]);
                $arResult["sourceId"] = intval($arRes["SOURCE_ID"]) > 0 ? intval($arRes["SOURCE_ID"]) : intval($arRes["ID"]);
                $arResult["UF"] = !empty($arRes["UF"]) ? $arRes["UF"] : array();
            }
        }
    } elseif ($action == "delete_comment") {
        $arResult = false;
        $comment_id = intval($_REQUEST["delete_comment_id"]);
        $post_id = intval($_REQUEST["post_id"]);
        if ($comment_id > 0 && $post_id > 0) {
            $arRes = CSocNetLogComponent::getCommentByRequest($comment_id, $post_id, "delete");
            if ($arRes) {
                $bSuccess = CSocNetLogComments::Delete($arRes["ID"], true);
                if (!$bSuccess && ($e = $GLOBALS["APPLICATION"]->GetException())) {
                    $errorMessage = $e->GetString();
                }
                $APPLICATION->IncludeComponent("bitrix:main.post.list", "", array("ENTITY_XML_ID" => $_REQUEST["ENTITY_XML_ID"], "PUSH&PULL" => array("ID" => $bSuccess ? $arRes["SOURCE_ID"] > 0 ? $arRes["SOURCE_ID"] : $arRes["ID"] : false, "ACTION" => "DELETE"), "OK_MESSAGE" => $bSuccess ? GetMessage('SONET_LOG_COMMENT_DELETED') : '', "ERROR_MESSAGE" => !$bSuccess ? $errorMessage : ''));
            }
        }
    }
    header('Content-Type:application/json; charset=UTF-8');
    echo \Bitrix\Main\Web\Json::encode($arResult);
    /** @noinspection PhpUndefinedClassInspection */
    \CMain::finalActions();
    die;
}
define('PUBLIC_AJAX_MODE', true);
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_after.php";
開發者ID:Satariall,項目名稱:izurit,代碼行數:31,代碼來源:ajax.php

示例5: sendJsonResponse

 protected function sendJsonResponse($response)
 {
     $this->getApplication()->restartBuffer();
     while (ob_end_clean()) {
     }
     header('Content-Type:application/json; charset=UTF-8');
     echo Json::encode($response);
     /** @noinspection PhpUndefinedClassInspection */
     \CMain::finalActions();
     die;
 }
開發者ID:webgksupport,項目名稱:alpina,代碼行數:11,代碼來源:class.php

示例6: end

 protected function end($terminate = true)
 {
     if (IsModuleInstalled("disk")) {
         \Bitrix\Disk\Internals\Diag::getInstance()->logDebugInfo($this->getName());
     }
     if ($terminate) {
         /** @noinspection PhpUndefinedClassInspection */
         \CMain::finalActions();
         die;
     }
 }
開發者ID:Satariall,項目名稱:izurit,代碼行數:11,代碼來源:class.php


注:本文中的CMain::finalActions方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。