本文整理汇总了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;
}
示例2: end
protected function end($terminate = true)
{
Diag::getInstance()->logDebugInfo($this->getName());
if ($terminate) {
/** @noinspection PhpUndefinedClassInspection */
\CMain::finalActions();
die;
}
}
示例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;
}
示例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";
示例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;
}
示例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;
}
}