本文整理汇总了PHP中Agent::unFreezeAgent方法的典型用法代码示例。如果您正苦于以下问题:PHP Agent::unFreezeAgent方法的具体用法?PHP Agent::unFreezeAgent怎么用?PHP Agent::unFreezeAgent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Agent
的用法示例。
在下文中一共展示了Agent::unFreezeAgent方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: processAck
public function processAck($m)
{
$dom = $this->dom;
$headerNode = $m->headerNode;
$msgId = $m->msgId;
$agentSourceId = $m->sourceId;
# $msgId = $headerNode->getElementsByTagName('SIF_MsgId')->item(0)->nodeValue;
# $agentSourceId = $headerNode->getElementsByTagName('SIF_SourceId')->item(0)->nodeValue;
$originalMsgId = $dom->getElementsByTagName('SIF_OriginalMsgId')->item(0)->nodeValue;
$timestamp = $headerNode->getElementsByTagName('SIF_Timestamp')->item(0)->nodeValue;
$status = $dom->getElementsByTagName('SIF_Status');
$status = $status->item(0)->nodeValue;
$validSourceId = Agent::checkSourceId($agentSourceId);
if (!$validSourceId) {
RegisterError::invalidSourceId($agentSourceId, $msgId);
} else {
$agent = new Agent($agentSourceId);
if ($agent->isRegistered()) {
if ($status == 1) {
$agent->unFreezeAgent();
$this->updateMessageQueue($agent, $originalMsgId, $msgId);
} else {
if ($status == 3) {
//done processing
if ($originalMsgId == $agent->frozenMsgId) {
$agent->unFreezeAgent();
$this->updateMessageQueue($agent, $originalMsgId, $msgId);
} else {
GeneralError::EventACKError($this->xml);
}
} else {
if ($status == 2) {
//Intermediate wait for final
$agent->freezeAgent();
$agent->setFrozenMsgId($originalMsgId);
$timestamp = Utility::createTimestamp();
$msgId_u = Utility::createMessageId();
XmlHelper::buildSuccessMessage($msgId_u, $timestamp, $agent->sourceId, $msgId, 0, $originalMsg = null, $desc = null);
}
}
}
} else {
RegisterError::notRegisteredError($agentSourceId, $msgId);
}
}
}