本文整理匯總了PHP中CPullOptions::GetQueueServerHeaders方法的典型用法代碼示例。如果您正苦於以下問題:PHP CPullOptions::GetQueueServerHeaders方法的具體用法?PHP CPullOptions::GetQueueServerHeaders怎麽用?PHP CPullOptions::GetQueueServerHeaders使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CPullOptions
的用法示例。
在下文中一共展示了CPullOptions::GetQueueServerHeaders方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: GetConfig
public static function GetConfig($userId, $cache = true, $reopen = false, $mobile = false)
{
$pullConfig = Array();
if (defined('BX_PULL_SKIP_LS'))
$pullConfig['LOCAL_STORAGE'] = 'N';
if (IsModuleInstalled('bitrix24'))
$pullConfig['BITRIX24'] = 'Y';
if (!CPullOptions::GetQueueServerHeaders())
$pullConfig['HEADERS'] = 'N';
$arChannel = CPullChannel::Get($userId, $cache, $reopen);
if (is_array($arChannel))
{
$nginxStatus = CPullOptions::GetQueueServerStatus();
$webSocketStatus = false;
$arChannels = Array($arChannel['CHANNEL_ID']);
if ($nginxStatus)
{
if (defined('BX_PULL_SKIP_WEBSOCKET'))
{
$pullConfig['WEBSOCKET'] = 'N';
}
else
{
$webSocketStatus = CPullOptions::GetWebSocketStatus();
}
$arChannelShared = CPullChannel::GetShared($cache, $reopen);
if (is_array($arChannelShared))
{
$arChannels[] = $arChannelShared['CHANNEL_ID'];
$arChannel['CHANNEL_DT'] = $arChannel['CHANNEL_DT'].'/'.$arChannelShared['CHANNEL_DT'];
}
}
if ($mobile || defined('BX_MOBILE') || defined('BX_PULL_MOBILE'))
{
$pullConfig['MOBILE'] = 'Y';
$pullPath = ($nginxStatus? (CMain::IsHTTPS()? CPullOptions::GetListenSecureUrl($arChannels, true): CPullOptions::GetListenUrl($arChannels, true)): '/bitrix/components/bitrix/pull.request/ajax.php?UPDATE_STATE');
$pullPathMod = "";
}
else
{
$pullPath = ($nginxStatus? (CMain::IsHTTPS()? CPullOptions::GetListenSecureUrl($arChannels): CPullOptions::GetListenUrl($arChannels)): '/bitrix/components/bitrix/pull.request/ajax.php?UPDATE_STATE');
$pullPathMod = ($nginxStatus? (CMain::IsHTTPS()? CPullOptions::GetListenSecureUrl($arChannels, false, true): CPullOptions::GetListenUrl($arChannels, false, true)): '');
}
$pullPathWs = ($nginxStatus && $webSocketStatus? (CMain::IsHTTPS()? CPullOptions::GetWebSocketSecureUrl($arChannels): CPullOptions::GetWebSocketUrl($arChannels)): '');
return $pullConfig+Array(
'CHANNEL_ID' => implode('/', $arChannels),
'CHANNEL_DT' => $arChannel['CHANNEL_DT'],
'LAST_ID' => $arChannel['LAST_ID'],
'PATH' => $pullPath,
'PATH_MOD' => $pullPathMod,
'PATH_WS' => $pullPathWs,
'PATH_COMMAND' => defined('BX_PULL_COMMAND_PATH')? BX_PULL_COMMAND_PATH: '',
'METHOD' => ($nginxStatus? 'LONG': 'PULL'),
'REVISION' => PULL_REVISION,
'ERROR' => '',
);
}
return false;
}