本文整理汇总了PHP中CPullOptions::GetCommandPerHit方法的典型用法代码示例。如果您正苦于以下问题:PHP CPullOptions::GetCommandPerHit方法的具体用法?PHP CPullOptions::GetCommandPerHit怎么用?PHP CPullOptions::GetCommandPerHit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CPullOptions
的用法示例。
在下文中一共展示了CPullOptions::GetCommandPerHit方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
<td width="40%"></td>
<td width="60%">
<?=GetMessage("PULL_OPTIONS_NGINX_VERSION_034_DESC")?>
</td>
</tr>
<tr>
<td width="40%"></td>
<td width="60%"></td>
</tr>
<tr>
<td><?=GetMessage("PULL_OPTIONS_PATH_TO_PUBLISH")?>:</td>
<td><input id="config_path_to_publish" type="text" size="40" value="<?=htmlspecialcharsbx(CPullOptions::GetPublishUrl())?>" name="path_to_publish" <?=(CPullOptions::GetQueueServerStatus()? '':'disabled="true"')?>></td>
</tr>
<tr>
<td align="right" width="50%"><?=GetMessage("PULL_OPTIONS_NGINX_BUFFER")?>:</td>
<td><input id="config_nginx_command_per_hit" type="text" size="10" value="<?=CPullOptions::GetCommandPerHit()?>" name="nginx_command_per_hit" <?=(CPullOptions::GetQueueServerStatus() && CPullOptions::GetQueueServerVersion() > 1? '':'disabled="true"')?>></td>
</tr>
<tr>
<td width="40%"></td>
<td width="60%">
<?=GetMessage("PULL_OPTIONS_NGINX_BUFFERS_DESC")?>
</td>
</tr>
<tr>
<td width="40%"></td>
<td width="60%"></td>
</tr>
<tr>
<td ><?=GetMessage("PULL_OPTIONS_PATH_TO_LISTENER")?>:</td>
<td><input id="config_path_to_listener" type="text" size="40" value="<?=htmlspecialcharsbx(CPullOptions::GetListenUrl())?>" name="path_to_listener" <?=(CPullOptions::GetQueueServerStatus()? '':'disabled="true"')?>></td>
</tr>
示例2: Send
public static function Send($channelId, $message, $method = 'POST', $timeout = 5, $dont_wait_answer = true)
{
$result_start = '{"infos": ['; $result_end = ']}';
if (is_array($channelId) && CPullOptions::GetQueueServerVersion() == 1)
{
$results = Array();
foreach ($channelId as $channel)
{
$results[] = self::SendCommand($channel, $message, $method, $timeout, $dont_wait_answer);
}
$result = json_decode($result_start.implode(',', $results).$result_end);
}
else if (is_array($channelId))
{
$commandPerHit = CPullOptions::GetCommandPerHit();
if (count($channelId) > $commandPerHit)
{
$arGroup = Array();
$i = 0;
foreach($channelId as $channel)
{
if (count($arGroup[$i]) == $commandPerHit)
$i++;
$arGroup[$i][] = $channel;
}
$results = Array();
foreach($arGroup as $channels)
{
$result = self::SendCommand($channels, $message, $method, $timeout, $dont_wait_answer);
$subresult = json_decode($result);
$results = array_merge($results, $subresult->infos);
}
$result = json_decode('{"infos":'.json_encode($results).'}');
}
else
{
$result = self::SendCommand($channelId, $message, $method, $timeout, $dont_wait_answer);
$result = json_decode($result);
}
}
else
{
$result = self::SendCommand($channelId, $message, $method, $timeout, $dont_wait_answer);
$result = json_decode($result_start.$result.$result_end);
}
return $result;
}
示例3: htmlspecialcharsbx
:</td>
<td><input id="config_path_to_publish" type="text" size="40" value="<?php
echo htmlspecialcharsbx(CPullOptions::GetPublishUrl());
?>
" name="path_to_publish" <?php
echo CPullOptions::GetQueueServerStatus() ? '' : 'disabled="true"';
?>
></td>
</tr>
<tr>
<td align="right" width="50%"><?php
echo GetMessage("PULL_OPTIONS_NGINX_BUFFER");
?>
:</td>
<td><input id="config_nginx_command_per_hit" type="text" size="10" value="<?php
echo CPullOptions::GetCommandPerHit();
?>
" name="nginx_command_per_hit" <?php
echo CPullOptions::GetQueueServerStatus() && CPullOptions::GetQueueServerVersion() > 1 ? '' : 'disabled="true"';
?>
></td>
</tr>
<tr>
<td width="40%"></td>
<td width="60%">
<?php
echo GetMessage("PULL_OPTIONS_NGINX_BUFFERS_DESC");
?>
</td>
</tr>
<tr class="heading">