本文整理汇总了PHP中Agent::getMessages方法的典型用法代码示例。如果您正苦于以下问题:PHP Agent::getMessages方法的具体用法?PHP Agent::getMessages怎么用?PHP Agent::getMessages使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Agent
的用法示例。
在下文中一共展示了Agent::getMessages方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Agent
public function Agent($agentId, $zoneId = null)
{
$db2 = Zend_Registry::get('my_db2');
$agt = new Agents($db2);
$result = $agt->fetchAll("agent_id = " . $agentId);
$this->agentId = $agentId;
switch (DB_TYPE) {
case 'mysql':
$this->agentDesc = $result[0]->agent_name;
$this->sourceId = $result[0]->source_id;
$this->username = $result[0]->username;
$this->password = $result[0]->password;
$this->certCommonName = $result[0]->cert_common_name;
$this->certCommonDn = $result[0]->cert_common_dn;
$this->ipaddress = isset($result[0]->ipaddress) ? $result[0]->ipaddress : '';
$this->maxbuffersize = isset($result[0]->maxbuffersize) ? $result[0]->maxbuffersize : '';
$this->active = $result[0]->active;
$this->adminId = $result[0]->admin_id;
$this->pushMessages = Agent::getMessages($this->agentId, 1, $zoneId);
$this->receivedMessages = Agent::getMessages($this->agentId, 2, $zoneId);
break;
case 'oci8':
$this->agentDesc = $result[0]->AGENT_NAME;
$this->sourceId = $result[0]->SOURCE_ID;
$this->username = $result[0]->USERNAME;
$this->password = $result[0]->PASSWORD;
$this->certCommonName = $result[0]->CERT_COMMON_NAME;
$this->certCommonDn = $result[0]->CERT_COMMON_DN;
$this->ipaddress = $result[0]->IPADDRESS;
$this->maxbuffersize = $result[0]->MAXBUFFERSIZE;
$this->active = $result[0]->ACTIVE;
$this->adminId = $result[0]->ADMIN_ID;
$this->pushMessages = Agent::getMessages($this->agentId, 1, $zoneId);
$this->receivedMessages = Agent::getMessages($this->agentId, 2, $zoneId);
break;
}
$this->getCreatorUsername();
$this->numPushMessages = 0;
#$this->getNumMessages($zoneId, 1);
$this->numReceivedMessages = 0;
$this->numReceivedMessages = $this->getNumMessages($zoneId, 2);
}
示例2: getagentmessagesAction
public function getagentmessagesAction()
{
$lic = $_REQUEST['lic'];
if ($lic != $_SESSION['OPENZISKEYHOLE']) {
$this->view->msg = 'Not Ajax Request';
$this->_forward('error', 'error');
} else {
$auth = Zend_Auth::getInstance();
if ($auth->hasIdentity()) {
if (!$this->getRequest()->isXmlHttpRequest()) {
$this->view->msg = 'Not Ajax Request';
$this->_forward('error', 'error');
} else {
$empty = null;
$filterChain = new Zend_Filter();
$filterChain->addFilter(new Zend_Filter_Digits());
$agentId = isset($_POST['AGENT_ID']) ? $filterChain->filter($_POST['AGENT_ID']) : $empty;
$zoneId = isset($_POST['ZONE_ID']) ? $filterChain->filter($_POST['ZONE_ID']) : $empty;
if ($agentId != $empty) {
$this->view->pushMessages = Agent::getMessages($agentId, 1, $zoneId);
$this->view->receivedMessages = Agent::getMessages($agentId, 2, $zoneId);
$this->render('agentmessages');
} else {
$this->view->msg = 'Not Ajax Request';
$this->_forward('error', 'error');
}
}
} 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');
}
}
}
}