当前位置: 首页>>代码示例>>PHP>>正文


PHP arr::alfilter方法代码示例

本文整理汇总了PHP中arr::alfilter方法的典型用法代码示例。如果您正苦于以下问题:PHP arr::alfilter方法的具体用法?PHP arr::alfilter怎么用?PHP arr::alfilter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在arr的用法示例。


在下文中一共展示了arr::alfilter方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: processAction

 public function processAction(&$controller, $params)
 {
     $this->assignEmptyParams($params, 2, array('true'));
     list($showdetail, $filters) = $params;
     $channellist_view = new View('callmanager/channellist');
     $channellist_view->summaryfields = freeswitch_callmanager_Driver::getSummaryFields();
     $channellist_view->detailfields = freeswitch_callmanager_Driver::getDetailFields();
     $callManagerObj = new callManager();
     $input = Input::instance();
     if (!$filters) {
         $filters = array();
         $filters['state'] = $input->post('state_filters');
     }
     try {
         $channellist = $this->executeAction(array());
         arr::alfilter($channellist, $filters);
         arr::alsort($channellist, $input->post('channel_order'));
         foreach (array_keys($channellist) as $curkey) {
             $channellist[$curkey]['actions'] = callmanagerHelper::getFunctionLinksForCall($channellist[$curkey], $channellist[$curkey]['uuid']);
         }
         $channellist_view->channellist = $channellist;
         $channellist_view->updated = date('r');
         $channellist_view->showdetail = $showdetail;
         $channellist_view->render(TRUE);
     } catch (ESL_Exception $e) {
         echo 'An error has occured: ' . $e->getMessage() . '<br>';
         if (strpos($e->getMessage(), 'Not connected')) {
             echo 'This indicates that Freeswitch is not running, mod_event_socket is not configured, or the system is unable to log in.';
         }
     } catch (callmanagerException $e) {
         echo 'An error has occured: ' . $e->getMessage() . '<br>';
     }
     exit;
 }
开发者ID:swk,项目名称:bluebox,代码行数:34,代码来源:cmgetchannellist.php

示例2: getAgentList

 public function getAgentList()
 {
     try {
         $input = Input::instance();
         $queueId = $input->post('queueid');
         $agentlistview = new View('callcenter_supervisor/agentlist');
         $agentlistview->status_fields = self::$agent_status_fields;
         $agentlistview->showdetail = true;
         $agentlistview->updated = date('r');
         $callcenter_manager_obj = new CallCenterManager();
         $agentlistview->agentStatus = $callcenter_manager_obj->getQueueAgentStatus($queueId);
         $filters = array();
         $filters['status'] = $input->post('agentstatus_filters');
         foreach ($agentlistview->agentStatus as $agent => $agentdata) {
             $locationObj = Doctrine::getTable('Location')->findOneByDomain($agentdata['domain']);
             $agentObj = Doctrine::getTable('callcenter_agent')->findOneBycca_loginidAndcca_locationid($agentdata['loginid'], $locationObj->location_id);
             $agentlistview->agentStatus[$agent]['displayname'] = $agentObj->cca_displayname;
             $agentlistview->agentStatus[$agent]['id'] = $agentObj->cca_id;
             foreach (self::$agent_date_diffs as $fieldname => $fieldparts) {
                 $d1 = key($fieldparts) === 'now' ? 'now' : $agentdata[key($fieldparts)];
                 $d2 = current($fieldparts) === 'now' ? 'now' : $agentdata[current($fieldparts)];
                 $agentlistview->agentStatus[$agent][$fieldname] = dttm::timestampdiff($d1, $d2);
             }
             foreach (self::$agent_date_fields as $fieldname => $formated_fieldname) {
                 $agentlistview->agentStatus[$agent][$formated_fieldname] = date('r', $agentlistview->agentStatus[$agent][$fieldname]);
             }
         }
         arr::alfilter($agentlistview->agentStatus, $filters);
         arr::alsort($agentlistview->agentStatus, $input->post('agent_order'));
         $agentlistview->render(TRUE);
     } catch (Exception $e) {
         echo 'An error has occured: ' . $e->getMessage() . '<br>';
         if (strpos($e->getMessage(), 'Not connected')) {
             echo 'This indicates that Freeswitch is not running, mod_event_socket is not configured, or the system is unable to log in.';
         }
     }
     exit;
 }
开发者ID:swk,项目名称:bluebox,代码行数:38,代码来源:callcenter_supervisor.php

示例3: getRunningAgentList

 public function getRunningAgentList()
 {
     $driverName = Telephony::getDriverName();
     $agentDriver = call_user_func(array($driverName . '_callcenter_agent_Driver', 'getInstance'));
     $locationobjlist = Doctrine_Query::create()->select('*')->from('Location')->execute();
     foreach ($locationobjlist as $location) {
         $locationdomainlist[] = $location->domain;
     }
     $agentlist = $agentDriver->getRunningList();
     arr::alfilter($agentlist, array('domain' => $locationdomainlist));
     return $agentlist;
 }
开发者ID:swk,项目名称:bluebox,代码行数:12,代码来源:CallCenterManager.php


注:本文中的arr::alfilter方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。