本文整理汇总了PHP中Campaign::setAgent方法的典型用法代码示例。如果您正苦于以下问题:PHP Campaign::setAgent方法的具体用法?PHP Campaign::setAgent怎么用?PHP Campaign::setAgent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Campaign
的用法示例。
在下文中一共展示了Campaign::setAgent方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: yday
function yday($time)
{
return $time - 24 * 3600;
}
$yday_start = yday(mktime(0, 0, 0));
$yday_end = yday(mktime(23, 59, 59));
$data->setTimePeriod($yday_start, $yday_end);
echo "<h1>Data For Campaign: " . $camp . "</h1>\n";
?>
<table border="1">
<tr>
<th>Agent Name</th>
<th>First Login</th>
<th>Last Activity</th>
<th>Time Difference</th>
</tr>
<?php
foreach ($data->fetchData()->getAgents() as $agent) {
$data->setAgent($agent);
echo "<tr>\n";
echo "<td>" . $agent . "</td>\n";
$start = $data->fetchData()->getLoginTimes();
echo "<td>" . date("H:i:s", $start) . "</td>\n";
$end = $data->fetchData()->getLastActivity();
echo "<td>" . date("H:i:s", $end) . "</td>\n";
echo "<td>" . gmdate("H:i:s", $end - $start) . "</td>\n";
echo "</tr>\n";
}
?>
</table>
示例2: gmdate
echo "<h1>Data For Campaign: " . $camp . "</h1>\n";
?>
<table border="1">
<tr>
<th>Agent Name</th>
<th>Calls Answered</th>
<th>Average Talk Time</th>
<th>Average Park Time</th>
<th>Average Dispo Time</th>
<th>Average Dead Time</th>
<th>Average Handle Time</th>
<th>Average Wrap Time</th>
</tr>
<?php
foreach ($data->fetchData()->getAgents() as $agent) {
$data->setAgent($agent);
echo "<tr>\n";
echo "<td>" . $agent . "</td>\n";
echo "<td>" . $data->byInbound()->byQueue($data->byInbound()->queues)->getTotalAnswered() . "</td>\n";
echo "<td>" . gmdate("H:i:s", (int) $data->byInbound()->fetchCallTimes()->getAVGTalkTime()) . "</td>\n";
echo "<td>" . gmdate("H:i:s", (int) $data->byInbound()->fetchCallTimes()->getAVGHoldTime()) . "</td>\n";
echo "<td>" . gmdate("H:i:s", (int) $data->byInbound()->fetchCallTimes()->getAVGDispoTime()) . "</td>\n";
echo "<td>" . gmdate("H:i:s", (int) $data->byInbound()->fetchCallTimes()->getAVGDeadTime()) . "</td>\n";
echo "<td>" . gmdate("H:i:s", (int) $data->byInbound()->fetchCallTimes()->getAVGHandleTime()) . "</td>\n";
echo "<td>" . gmdate("H:i:s", (int) $data->byInbound()->fetchCallTimes()->getAVGWrapTime()) . "</td>\n";
echo "</tr>\n";
}
$data->setAgent(NULL);
echo "<tr>\n";
echo "<td><b>Total</b></td>\n";
echo "<td>" . $data->byInbound()->byQueue($data->byInbound()->queues)->getTotalAnswered() . "</td>\n";