本文整理汇总了PHP中Agent::getAgents方法的典型用法代码示例。如果您正苦于以下问题:PHP Agent::getAgents方法的具体用法?PHP Agent::getAgents怎么用?PHP Agent::getAgents使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Agent
的用法示例。
在下文中一共展示了Agent::getAgents方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: switch
}
break;
case "delete":
break;
}
break;
case "agents":
$pageBody = '<h1>agents</h1>';
$action = "list";
if (isset($_REQUEST["action"])) {
$action = $_REQUEST["action"];
}
switch ($action) {
case "list":
default:
$agents = Agent::getAgents();
if (count($agents) > 0) {
$pageBody = '
<table>
<thead>
<tr>
<th>#</th>
<th>name</th>
<th>since</th>
<th>deliveries</th>
<th>rating</th>
<th>actions</th>
</tr>
</thead>
<tbody>';
foreach ($agents as $agentID) {
示例2: getagentsAction
public function getagentsAction()
{
$auth = Zend_Auth::getInstance();
$lic = $_REQUEST['lic'];
if ($lic != $_SESSION['OPENZISKEYHOLE']) {
$this->view->msg = 'Not Ajax Request';
$this->_forward('error', 'error');
} else {
if ($auth->hasIdentity()) {
if (!$this->getRequest()->isXmlHttpRequest()) {
$this->view->msg = 'Not Ajax Request';
$this->_forward('error', 'error');
} else {
$agents = Agent::getAgents();
if (count($agents) > 0) {
$json = Zend_Json::encode($agents);
$this->view->json = $json;
}
$this->render('ajaxsuccessjson');
}
} else {
if (!$this->getRequest()->isXmlHttpRequest()) {
$this->view->msg = 'Not Ajax Request';
$this->_forward('error', 'error');
} else {
$this->view->msg = 'Invalid User';
$this->_forward('error', 'error');
}
}
}
}