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


PHP Handler::getIterator方法代码示例

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


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

示例1: _populateHandlers

 protected function _populateHandlers()
 {
     $this->_handlers = array();
     try {
         $cacheCodeObjects = Zend_Registry::get('cacheCodeObjects');
     } catch (Exception $e) {
         $cacheCodeObjects = array();
     }
     $handler = new Handler();
     $db = Zend_Registry::get('dbAdapter');
     $dbSelect = $db->select()->from($handler->_table)->where('handlerType = ' . Handler::HANDLER_TYPE_HL7)->where('active = 1');
     $handlerIterator = $handler->getIterator($dbSelect);
     foreach ($handlerIterator as $item) {
         $conditionObject = $item->conditionObject;
         if (!strlen($conditionObject) > 0) {
             $conditionObject = $item->generateDefaultConditionObject();
         }
         $md5 = md5($conditionObject);
         if (!in_array($md5, $cacheCodeObjects)) {
             $cacheCodeObjects[] = $md5;
             eval($conditionObject);
             // TODO: needs to be validated
         }
         $this->_handlers[] = $item;
     }
     Zend_Registry::set('cacheCodeObjects', $cacheCodeObjects);
 }
开发者ID:jakedorst,项目名称:ch3-dev-preview,代码行数:27,代码来源:ProcessHL7.php

示例2: _populateHandlers

 protected function _populateHandlers()
 {
     $this->_handlers = array();
     try {
         $cacheCodeObjects = Zend_Registry::get('cacheCodeObjects');
     } catch (Exception $e) {
         $cacheCodeObjects = array();
     }
     $handler = new Handler();
     $db = Zend_Registry::get('dbAdapter');
     $dbSelect = $db->select()->from($handler->_table)->where('handlerType = ' . Handler::HANDLER_TYPE_HL7)->where('active = 1');
     $handlerIterator = $handler->getIterator($dbSelect);
     foreach ($handlerIterator as $item) {
         $classes = array();
         $conditionObject = $item->conditionObject;
         if (!strlen($conditionObject) > 0) {
             $conditionObject = $item->generateDefaultConditionObject();
         }
         $classConditionHandler = $item->normalizedName . 'ConditionHandler';
         $classDatasource = $item->dataIntegrationDatasource->normalizedName . 'DataIntegrationDatasource';
         $classDestination = $item->dataIntegrationDestination->normalizedName . 'DataIntegrationDestination';
         $classAction = $item->dataIntegrationAction->normalizedName . 'DataIntegrationAction';
         if (!class_exists($classConditionHandler) && strlen($conditionObject) > 0) {
             $classes[] = $conditionObject;
         }
         if (!class_exists($classDatasource) && strlen($item->dataIntegrationDatasource->datasource) > 0) {
             $classes[] = $item->dataIntegrationDatasource->datasource;
         }
         if (!class_exists($classDestination) && strlen($item->dataIntegrationDestination->connectInfo) > 0) {
             $classes[] = $item->dataIntegrationDestination->connectInfo;
         }
         if (!class_exists($classAction) && strlen($item->dataIntegrationAction->action) > 0) {
             $classes[] = $item->dataIntegrationAction->action;
         }
         foreach ($classes as $class) {
             eval($class);
             // TODO: needs to be validated
         }
         $this->_handlers[] = $item;
     }
     Zend_Registry::set('cacheCodeObjects', $cacheCodeObjects);
 }
开发者ID:dragonlet,项目名称:clearhealth,代码行数:42,代码来源:ProcessHL7.php

示例3: listAction

 public function listAction()
 {
     $type = (int) $this->_getParam('type');
     $handler = new Handler($type);
     $handlerIterator = $handler->getIterator();
     $listConditions = Handler::listConditions();
     $rows = array();
     foreach ($handlerIterator as $item) {
         $condition = $this->_customName;
         if (isset($listConditions[$item->condition]) && !strlen($item->conditionObject) > 0) {
             $condition = $listConditions[$item->condition];
         }
         $tmp = array();
         $tmp['id'] = $item->handlerId;
         switch ($type) {
             case Handler::HANDLER_TYPE_GA:
                 // General Alert
             // General Alert
             case Handler::HANDLER_TYPE_HSA:
                 // Health Status Alert
                 $tmp['data'][] = $item->name;
                 $tmp['data'][] = $condition;
                 $tmp['data'][] = $item->active;
                 break;
             default:
                 // HL7
                 $tmp['data'][] = $item->name;
                 $tmp['data'][] = $item->direction;
                 $tmp['data'][] = $condition;
                 $tmp['data'][] = $item->active;
                 break;
         }
         $rows[] = $tmp;
     }
     $json = Zend_Controller_Action_HelperBroker::getStaticHelper('json');
     $json->suppressExit = true;
     $json->direct(array('rows' => $rows));
 }
开发者ID:dragonlet,项目名称:clearhealth,代码行数:38,代码来源:HandlersController.php

示例4: hsaSectionJsonAction

 public function hsaSectionJsonAction()
 {
     $hsa = $this->_getParam('hsa');
     $enumeration = new Enumeration();
     $enumeration->enumerationId = (int) $hsa;
     $enumeration->populate();
     $enumerationsClosure = new EnumerationsClosure();
     $enumerationIterator = $enumerationsClosure->getAllDescendants($enumeration->enumerationId, 1);
     $rows = array();
     foreach ($enumerationIterator as $enum) {
         $tmp = array();
         $tmp['id'] = $enum->enumerationId;
         $tmp['data'][] = '';
         $tmp['data'][] = $enum->name;
         $tmp['data'][] = $enum->key;
         $rows[] = $tmp;
     }
     // temporarily set rows to all defined HSA handlers
     $rows = array();
     $handler = new Handler(Handler::HANDLER_TYPE_HSA);
     $handlerIterator = $handler->getIterator();
     foreach ($handlerIterator as $row) {
         $tmp = array();
         $tmp['id'] = $row->handlerId;
         $tmp['data'][] = '';
         $tmp['data'][] = $row->name;
         $tmp['data'][] = $row->timeframe;
         $rows[] = $tmp;
     }
     $json = Zend_Controller_Action_HelperBroker::getStaticHelper('json');
     $json->suppressExit = true;
     $json->direct(array('rows' => $rows), true);
 }
开发者ID:dragonlet,项目名称:clearhealth,代码行数:33,代码来源:VisitDetailsController.php


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