Esempio n. 1
0
 /**
  * @param array $module_data
  * @return array
  */
 private function _get_same_fields_of_other_module($module_data)
 {
     $other_module_fields = [];
     $interface_info = $this->_interface_info[$this->_current_flow_id];
     $flow_modules = $interface_info[self::IIK_FLOW_MODULES];
     foreach ($module_data as $_field_name => $_module_name) {
         //查看此次会不会有这个module载入,有则跳过,没有则取出来
         if (in_array($_module_name, $flow_modules)) {
             Lib_Log::DEBUG('Module %s would be loaded', $_module_name);
             continue;
         } else {
             $fields = $this->get_registered_fields();
             if (!isset($fields[$_module_name])) {
                 Lib_Log::WARN('No such module: %s', [$_module_name]);
                 continue;
             }
             if (!isset($fields[$_module_name][Const_Interface::FIELDS_KEY_FIELDS])) {
                 Lib_Log::WARN('No such fields in module: [%s]', [$_module_name]);
                 continue;
             }
             $values_in_field = $fields[$_module_name][Const_Interface::FIELDS_KEY_FIELDS];
             if (!isset($values_in_field[$_field_name])) {
                 Lib_Log::WARN('No such field [%s] in module: [%s]', [$_field_name, $_module_name]);
                 continue;
             }
             $field_data = $values_in_field[$_field_name];
             $other_module_fields[] = self::_format_field($_module_name, $_field_name, $field_data);
         }
     }
     return $other_module_fields;
 }