###__删除规则__ : 删除对应规则, 即nes的规则都是在运行时可删可增的
976000
function(name) {
      if (typeOf(name) === "array") {
        for (var i = name.length; i--;) {
          this.off(name[i]);
        }
      } else {
        if (this._rules[name]) {
          delete this._rules[name];
        }
      }
      return this;
    }
589664
function Overloader() {
		var overloaded = new OverloadedFunction();
		var append = function(args) {
			overloaded.overload.apply(overloaded, args);
		};

		if (arguments.length) {
			// append(arguments);
		}

		var fn = function() {
			return overloaded.apply(this, arguments);
		};

		// 已创建的多态函数，仍可通过 overload() 方法扩展其多态实现。
		fn.overload = function(/* Type, Type, ..., Function */) {
			append(arguments);
			return fn;
		};

		// 扩展多态实现，同时将该实现设定为默认实现。
		fn.default = function(method) {
			overloaded.default(method);
			return fn;
		};

		// 返回一个函数实体。
		return fn;
	}
847339
function () {
            var time = this.time;
            var timezoneOffset = this.timezoneOffset * ONE_MINUTE;
            var fixedDate = toInt(timezoneOffset / ONE_DAY);
            var timeOfDay = timezoneOffset % ONE_DAY;
            fixedDate += toInt(time / ONE_DAY);
            timeOfDay += time % ONE_DAY;
            if (timeOfDay >= ONE_DAY) {
                timeOfDay -= ONE_DAY;
                fixedDate++;
            } else {
                while (timeOfDay < 0) {
                    timeOfDay += ONE_DAY;
                    fixedDate--;
                }
            }
            fixedDate += EPOCH_OFFSET;
            var date = Utils.getGregorianDateFromFixedDate(fixedDate);
            var year = date.year;
            var fields = this.fields;
            fields[YEAR] = year;
            fields[MONTH] = date.month;
            fields[DAY_OF_MONTH] = date.dayOfMonth;
            fields[DAY_OF_WEEK] = date.dayOfWeek;
            if (timeOfDay !== 0) {
                fields[HOUR_OF_DAY] = toInt(timeOfDay / ONE_HOUR);
                var r = timeOfDay % ONE_HOUR;
                fields[MINUTE] = toInt(r / ONE_MINUTE);
                r %= ONE_MINUTE;
                fields[SECONDS] = toInt(r / ONE_SECOND);
                fields[MILLISECONDS] = r % ONE_SECOND;
            } else {
                fields[HOUR_OF_DAY] = fields[MINUTE] = fields[SECONDS] = fields[MILLISECONDS] = 0;
            }
            var fixedDateJan1 = Utils.getFixedDate(year, GregorianCalendar.JANUARY, 1);
            var dayOfYear = fixedDate - fixedDateJan1 + 1;
            var fixDateMonth1 = fixedDate - date.dayOfMonth + 1;
            fields[DAY_OF_YEAR] = dayOfYear;
            fields[DAY_OF_WEEK_IN_MONTH] = toInt((date.dayOfMonth - 1) / 7) + 1;
            var weekOfYear = getWeekNumber(this, fixedDateJan1, fixedDate);    // 本周没有足够的时间在当前年
            // 本周没有足够的时间在当前年
            if (weekOfYear === 0) {
                // If the date belongs to the last week of the
                // previous year, use the week number of "12/31" of
                // the "previous" year.
                var fixedDec31 = fixedDateJan1 - 1;
                var prevJan1 = fixedDateJan1 - getYearLength(year - 1);
                weekOfYear = getWeekNumber(this, prevJan1, fixedDec31);
            } else // 本周是年末最后一周，可能有足够的时间在新的一年
            if (weekOfYear >= 52) {
                var nextJan1 = fixedDateJan1 + getYearLength(year);
                var nextJan1st = getDayOfWeekDateOnOrBefore(nextJan1 + 6, this.firstDayOfWeek);
                var nDays = nextJan1st - nextJan1;    // 本周有足够天数在新的一年
                // 本周有足够天数在新的一年
                if (nDays >= this.minimalDaysInFirstWeek && // 当天确实在本周，weekOfYear === 53 时是不需要这个判断
                    fixedDate >= nextJan1st - 7) {
                    weekOfYear = 1;
                }
            }
            fields[WEEK_OF_YEAR] = weekOfYear;
            fields[WEEK_OF_MONTH] = getWeekNumber(this, fixDateMonth1, fixedDate);
            this.fieldsComputed = true;
        }
153782
async function handle(sofar) {
    //根据路由执行相关操作
    try{
        let rs = await sofar.facade.callFunc(sofar.msg.control, sofar.msg.func, sofar.socket.user, sofar.msg);
        sofar.fn(rs);
    }catch(e){
        sofar.fn({code: facade.const.ReturnCode.Error});

        console.error(e);
    }
}
728240
function runFile(src, context) {

    // 格式作路径
    src = path.cwd(src);

    // 返回运行结果
    return runCode(fs.readFileSync(src, 'utf8'), {
        __dirname: path.dirname(src),
        __filename: src,
        ...context
    });
}
794901
function Queue() {
    
            /**
             * 统计文件数。
             * * `numOfQueue` 队列中的文件数。
             * * `numOfSuccess` 上传成功的文件数
             * * `numOfCancel` 被移除的文件数
             * * `numOfProgress` 正在上传中的文件数
             * * `numOfUploadFailed` 上传错误的文件数。
             * * `numOfInvalid` 无效的文件数。
             * @property {Object} stats
             */
            this.stats = {
                numOfQueue: 0,
                numOfSuccess: 0,
                numOfCancel: 0,
                numOfProgress: 0,
                numOfUploadFailed: 0,
                numOfInvalid: 0
            };
    
            // 上传队列，仅包括等待上传的文件
            this._queue = [];
    
            // 存储所有文件
            this._map = {};
        }
690310
function (selector) {

        var chars = '';
        var that = this;


        // 将多个语句拆开进行查询，避免其中有失败导致所有规则失效
        if (selector.indexOf(',') !== -1) {
            
            selector.split(',').forEach(function (selector) {
                chars += that.querySelectorChars(selector).join('');
            });

            return chars.split('');
        }


        var $elem;
        var $ = this.$;
        var RE_DPSEUDOS = /\:(link|visited|target|active|focus|hover|checked|disabled|enabled|selected|lang\(([-\w]{2,})\)|not\(([^()]*|.*)\))?(.*)/i;


        // 剔除状态伪类
        selector = selector.replace(RE_DPSEUDOS, '');


        // 使用选择器查找节点
        try {
            $elem = $(selector);
        } catch (e) {
            // 1. 包含 :before \ :after 等不支持的伪类
            // 2. 非法语句
            return [];
        }


        // 查找文本节点
        $elem.each(function () {
            chars += $(this).text();
        });


        chars = chars.split('');


        if (this.options.debug) {
            console.log('');
            console.log('[DEBUG]', 'HtmlParser#querySelectorChars', selector, this.file);
            console.log(chars.join(''));
        }


        return chars;
    }
1195781
public function init() {
		//触发应用开始事件
		$this->eventDispatcher->dispatchEvent(new \Fasim\Event\Event(\Fasim\Event\Event::$APP_START));

		//初始化配置
		$this->registerFacdes();

		//设置时区
		$timezone = $this->make('config')->get('timezone', 'Asia/Shanghai');
		date_default_timezone_set($timezone);

		//设置调试模式
		$debugMode = $this->make('config')->get('debug') === true;
		$this->setDebugMode($debugMode);
		$this->eventDispatcher->dispatchEvent(new \Fasim\Event\Event(\Fasim\Event\Event::$APP_READY));
	}
875272
function runCode(code, options = {}) {
    let res = babel.transform(code, babelOptions),
        scope = { exports: {} },
        dirname = options.__dirname || process.cwd(),
        filename = options.__filename || dirname + '/index.js',
        resolve = file => file.startsWith('.') ? path.resolve(dirname, file) : file,
        loader = file => require(resolve(file)),
        script = new vm.Script(res.code, { filename });

    // 设置解析函数
    loader.resolve = resolve;

    // 解析数据
    return script.runInNewContext({
        process,
        ...options,
        module: scope,
        exports: scope.exports,
        require: loader,
        __dirname: dirname,
        __filename: filename
    });
}
574121
function () {
        const editor = this.editor
        const $textElem = editor.$textElem

        $textElem.on('keydown', e => {
            if (e.keyCode !== 8) {
                return
            }
            const txtHtml = $textElem.html().toLowerCase().trim()
            if (txtHtml === '<p><br></p>') {
                // 最后剩下一个空行，就不再删除了
                e.preventDefault()
                return
            }
        })

        $textElem.on('keyup', e => {
            if (e.keyCode !== 8) {
                return
            }
            let $p
            const txtHtml = $textElem.html().toLowerCase().trim()

            // firefox 时用 txtHtml === '<br>' 判断，其他用 !txtHtml 判断
            if (!txtHtml || txtHtml === '<br>') {
                // 内容空了
                $p = $('<p><br/></p>')
                $textElem.html('') // 一定要先清空，否则在 firefox 下有问题
                $textElem.append($p)
                editor.selection.createRangeByElem($p, false, true)
                editor.selection.restoreSelection()
            }
        })

    }
366008
function type(data) {
      var result = [];
      for (var i = 0; i < data.values.length; i++) {
        var day = new Date(defaultYear + '-' + data.axisX[i]).getDay();
        var isWeekend = (day == 6 || day == 0) ? true : false;
        // object
        var o = {
          xAxis: data.axisX[i],
          isWeekend: isWeekend,
          all: ALL_MINUTE
        };

        var originData = data.values[i];
        var newData;
        if (typeof originData == 'string') {
          newData = originData.trim().split(' ');
        } else {
          newData = originData;
        }
        var len = newData.length;
        if (len >= 2) {
          var arr1 = newData[0].split(':');
          var arr2 = newData[len - 1].split(':');
          var t1 = parseInt(arr1[0]) * 60 + parseInt(arr1[1]); // 上班打卡时间
          var t2 = parseInt(arr2[0]) * 60 + parseInt(arr2[1]); // 下班打卡时间

          var AMBefore = 0; // 休息时间
          var AMOver = 0; // 预备时间,(超过阈值当作加班时间)
          var AMRest = 0; // 上午休息时间
          var AMLate = 0; // 上午迟到时间
          var AMWork = 0; // 上午工作时间
          var AMEarly = 0; // 上午早退时间

          var PMRest = 0; // 午休时间
          var PMLate = 0; // 下午迟到时间
          var PMWork = 0; // 下午工作时间
          var PMEarly = 0; // 下午早退时间
          var PMOver = 0; // 加班时间，非正常情况下特殊加班用
          var PMAfter = 0; // 休息时间

          if (t2 <= elasticFirst) {
            AMBefore = t1;
            AMOver = t2 - t1;
            AMRest = HALF_MINUTE - t2;
            AMLate = 0;
            AMWork = 0;
            AMEarly = 0;

            PMRest = 0;
            PMLate = 0;
            PMWork = 0;
            PMEarly = 0;
            PMOver = 0;
            PMAfter = HALF_MINUTE;
          } else if (t2 <= HALF_MINUTE) {
            AMBefore = t1;
            if (t1 < elasticFirst) {
              AMOver = elasticFirst - t1;
            } else {
              AMOver = 0;
            }
            AMRest = 0;
            if (t1 > elasticLatest) {
              AMLate = t1 - elasticLatest;
            } else {
              AMLate = 0;
            }
            if (t1 <= elasticFirst) {
              AMWork = t2 - elasticFirst;
            } else if (t1 > elasticFirst) {
              AMWork = t2 - t1;
            } else {
              AMWork = 0;
            }
            AMEarly = HALF_MINUTE - t2;

            PMRest = 0;
            PMLate = 0;
            PMWork = 0
            PMEarly = 0;
            PMOver = 0;
            PMAfter = HALF_MINUTE;
          } else if (t2 <= AFTERNOON_START && t1 >= HALF_MINUTE) {
            AMBefore = HALF_MINUTE;
            AMOver = 0;
            AMRest = 0;
            AMLate = 0;
            AMWork = 0;
            AMEarly = 0;
            PMRest = restMinute;
            PMLate = 0;
            PMWork = 0;
            PMEarly = 0;
            PMOver = 0;
            PMAfter = HALF_MINUTE - restMinute;
          } else if (t1 >= HALF_MINUTE) {
            AMBefore = HALF_MINUTE;
            AMOver = 0;
            AMRest = 0;
            AMLate = 0;
            AMWork = 0;
            AMEarly = 0;
            PMRest = restMinute;
            PMLate = t1 > AFTERNOON_START ? (t1 - AFTERNOON_START) : 0;
            PMWork = (t2 - (t1 < AFTERNOON_START ? AFTERNOON_START : t1) >= workMinute) ? workMinute : (t2 - (t1 < AFTERNOON_START ? AFTERNOON_START : t1));
            PMEarly = (t2 < AFTERNOON_FIRST) ? (AFTERNOON_FIRST - t2) : 0;
            PMOver = (PMWork < workMinute) ? 0 : (t2 - (t1 < AFTERNOON_START ? AFTERNOON_START : t1) - workMinute);
            PMAfter = ALL_MINUTE - (t2 < AFTERNOON_START ? AFTERNOON_START : t2) - PMEarly;
          } else if (t1 >= AFTERNOON_LATEST) {
            AMBefore = HALF_MINUTE;
            AMOver = 0;
            AMRest = 0;
            AMLate = 0;
            AMWork = 0;
            AMEarly = 0;
            PMRest = HALF_MINUTE - PMOver - PMAfter;
            PMLate = 0;
            PMWork = 0;
            PMEarly = 0;
            PMOver = t2 - t1;
            PMAfter = ALL_MINUTE - t2;
          } else {
            AMOver = t1 > elasticFirst ? 0 : (elasticFirst - t1);
            AMRest = 0;
            AMLate = t1 < elasticLatest ? 0 : t1 - elasticLatest;
            AMWork = HALF_MINUTE - (t1 >= elasticFirst ? t1 : elasticFirst);
            AMEarly = 0;
            AMBefore = t1 - AMLate;

            PMRest = restMinute;
            PMLate = 0;
            if (t2 < AFTERNOON_START) {
              PMWork = 0;
            } else {
              var temp = t2 - (t1 < elasticFirst ? elasticFirst : t1) - restMinute;
              PMWork = temp > workMinute ? (workMinute - AMWork) : (temp - AMWork);
            }
            if (t2 < AFTERNOON_LATEST) {
              PMEarly = workMinute - AMWork - PMWork;
            } else {
              PMEarly = 0;
            }
            PMOver = (t2 - (t1 < elasticFirst ? elasticFirst : t1) - restMinute - workMinute) > 0 ? (t2 - (t1 < elasticFirst ? elasticFirst : t1) - restMinute - workMinute) : 0;
            PMAfter = ALL_MINUTE - (t2 < AFTERNOON_START ? AFTERNOON_START : t2) - PMEarly;
          }

          o[STACK_LABEL[0]] = AMBefore;
          o[STACK_LABEL[1]] = AMOver;
          o[STACK_LABEL[2]] = AMRest;
          o[STACK_LABEL[3]] = AMLate;
          o[STACK_LABEL[4]] = AMWork;
          o[STACK_LABEL[5]] = AMEarly;
          o[STACK_LABEL[6]] = PMRest;
          o[STACK_LABEL[7]] = PMLate;
          o[STACK_LABEL[8]] = PMWork;
          o[STACK_LABEL[9]] = PMEarly;
          o[STACK_LABEL[10]] = PMOver;
          o[STACK_LABEL[11]] = PMAfter;
          console.log((AMBefore + AMOver+ AMRest + AMLate + AMWork + AMEarly) == (PMAfter + PMOver + PMRest + PMLate + PMWork + PMEarly));
          result.push(o);
        } else {
          o[STACK_LABEL[0]] = HALF_MINUTE;
          o[STACK_LABEL[1]] = 0;
          o[STACK_LABEL[2]] = 0;
          o[STACK_LABEL[3]] = 0;
          o[STACK_LABEL[4]] = 0;
          o[STACK_LABEL[5]] = 0;
          o[STACK_LABEL[6]] = 0;
          o[STACK_LABEL[7]] = 0;
          o[STACK_LABEL[8]] = 0;
          o[STACK_LABEL[9]] = 0;
          o[STACK_LABEL[10]] = 0;
          o[STACK_LABEL[11]] = HALF_MINUTE;
          result.push(o);
        }
      }
      return result;
    }
200032
function emit(resolver) {
        var items = resolver.status === STATUS.FULFILLED
            ? resolver.fulfillList
            : resolver.rejectList;

        emitGlobalEvent(resolver);

        if (!items.length) {
            return;
        }

        // 触发注册的回调函数必须
        // 在状态改变完成后
        // see #2.2.2 #2.2.3 #2.2.4
        Resolver.nextTick(
            function () {
                var item;
                while (item = items.shift()) {
                    item(resolver.data);
                }
            }
        );
    }
969768
function (cmd) {
        if (!this._saveData) {
            return;
        }

        var data = this.data;
        if (this._len + arguments.length > data.length) {
            // 因为之前的数组已经转换成静态的 Float32Array
            // 所以不够用时需要扩展一个新的动态数组
            this._expandData();
            data = this.data;
        }
        for (var i = 0; i < arguments.length; i++) {
            data[this._len++] = arguments[i];
        }

        this._prevCmd = cmd;
    }
1265027
@Override
	public void run() {
		ThriftConnectionHandle<T> connection;
		long tmp;
		long nextCheckInMs = this.maxConnectionAge;

		int partitionSize = this.thriftConnectionPartition.getAvailableConnections();
		long currentTime = System.currentTimeMillis();
		for (int i = 0; i < partitionSize; i++) {
			try {
				connection = this.thriftConnectionPartition.poolFreeConnection();

				if (connection != null) {
					connection.setOriginatingPartition(this.thriftConnectionPartition);

					tmp = this.maxConnectionAge - (currentTime - connection.getConnectionCreationTimeInMs());

					if (tmp < nextCheckInMs) {
						nextCheckInMs = tmp;
					}

					// 判断连接是否过期
					if (connection.isExpired(currentTime)) {
						// 关闭连接
						closeConnection(connection);
						continue;
					}

					if (lifoMode == ServiceOrder.LIFO) {
						if (!(connection.getConnectionPartition().getFreeConnections().offer(connection))) {
							connection.internalClose();
						}
					} else {
						this.thriftConnectionPool.putConnectionBackInPartition(connection);
					}
					// 避免cpu使用率过高 进行一段时间休眠
					Thread.sleep(20L);
				}
			} catch (Throwable e) {
				logger.error("Connection max age thread exception.", e);
			}
		}

	}
219430
function queryBat (queue, cb) {
  const res = []

  queue.forEach(item => {
    const { selector, single, fields, component } = item
    // selector 的容器节点
    /* eslint-disable */
    const container = (
      component !== null ?
        (Nerv.findDOMNode(component) || document) :
        document
    )
    /* eslint-enable */

    // 特殊处理 ---- 选自己
    let selectSelf = false
    if (container !== document) {
      const $nodeList = container.parentNode.querySelectorAll(selector)
      for (let i = 0, len = $nodeList.length; i < len; ++i) {
        if (container === $nodeList[i]) {
          selectSelf = true
          break
        }
      }
    }

    if (single) {
      const el = selectSelf === true ? container : container.querySelector(selector)
      res.push(filter(fields, el, selector))
    } else {
      const $children = container.querySelectorAll(selector)
      const children = []
      selectSelf === true && children.push(container)
      for (let i = 0, len = $children.length; i < len; ++i) {
        children.push($children[i])
      }
      res.push(children.map(dom => filter(fields, dom)))
    }
  })
  cb(res)
}
824625
public function getinfo()
    {
        error_reporting(0);    //会有多处报错，因此这里进行屏蔽
        switch (PHP_OS) {// 根据不同系统取得CPU相关信息
            case "Linux":
                $sysInfo = self::sys_linux();
                break;
            case "FreeBSD":
                $sysInfo = self::sys_freebsd();
                break;
            default:
                $sysInfo = [];
                break;
        }
        $result = $sysInfo;
        $result['freeSpace'] = round(@disk_free_space(".") / (1024 * 1024 * 1024), 3);
        $result['diskTotal'] = round(@disk_total_space(".") / (1024 * 1024 * 1024), 3);    //总空间
        //网卡流量
        $strs = @file("/proc/net/dev");
        $NetOut = array();
        for ($i = 2; $i < count($strs); $i++) {
            preg_match_all("/([^\s]+):[\s]{0,}(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)/", $strs[$i], $info);
            /*	$NetInput[$i] = formatsize($info[2][0]);
                $NetOut[$i]  = formatsize($info[10][0]);
            */
            $tmo = round($info[2][0] / 1024 / 1024, 5);
            $tmo2 = round($tmo / 1024, 5);
            $NetInput[$i] = $tmo2;
            $tmp = round($info[10][0] / 1024 / 1024, 5);
            $tmp2 = round($tmp / 1024, 5);
            $NetOut[$i] = $tmp2;
        }
        //判断内存如果小于1GB，就显示M，否则显示GB单位
        if ($sysInfo['memTotal'] < 1024) {
            $result['TotalMemory'] = $sysInfo['memTotal'] . " MB";
            $result['UsedMemory'] = $sysInfo['memUsed'] . " MB";
            $result['FreeMemory'] = $sysInfo['memFree'] . " MB";
            $result['CachedMemory'] = $sysInfo['memCached'] . " MB";    //cache化内存
            $result['Buffers'] = $sysInfo['memBuffers'] . " MB";    //缓冲
            $result['TotalSwap'] = $sysInfo['swapTotal'] . " MB";
            $result['swapUsed'] = $sysInfo['swapUsed'] . " MB";
            $result['swapFree'] = $sysInfo['swapFree'] . " MB";
            $result['swapPercent'] = $sysInfo['swapPercent'];
            $result['memRealUsed'] = $sysInfo['memRealUsed'] . " MB"; //真实内存使用
            $result['memRealFree'] = $sysInfo['memRealFree'] . " MB"; //真实内存空闲
            $result['memRealPercent'] = $sysInfo['memRealPercent']; //真实内存使用比率
            $result['memPercent'] = $sysInfo['memPercent'] . '%'; //内存总使用率
            $result['memCachedPercent'] = $sysInfo['memCachedPercent']; //cache内存使用率
        } else {
            $result['TotalMemory'] = round($sysInfo['memTotal'] / 1024, 3) . " GB";
            $result['UsedMemory'] = round($sysInfo['memUsed'] / 1024, 3) . " GB";
            $result['FreeMemory'] = round($sysInfo['memFree'] / 1024, 3) . " GB";
            $result['CachedMemory'] = round($sysInfo['memCached'] / 1024, 3) . " GB";
            $result['Buffers'] = round($sysInfo['memBuffers'] / 1024, 3) . " GB";
            $result['TotalSwap'] = round($sysInfo['swapTotal'] / 1024, 3) . " GB";
            $result['swapUsed'] = round($sysInfo['swapUsed'] / 1024, 3) . " GB";
            $result['swapFree'] = round($sysInfo['swapFree'] / 1024, 3) . " GB";
            $result['swapPercent'] = $sysInfo['swapPercent'];
            $result['memRealUsed'] = round($sysInfo['memRealUsed'] / 1024, 3) . " GB"; //真实内存使用
            $result['memRealFree'] = round($sysInfo['memRealFree'] / 1024, 3) . " GB"; //真实内存空闲
            $result['memRealPercent'] = $sysInfo['memRealPercent']; //真实内存使用比率
            $result['memPercent'] = $sysInfo['memPercent'] . '%'; //内存总使用率
            $result['memCachedPercent'] = $sysInfo['memCachedPercent']; //cache内存使用率
        }
        $result['barmemCachedPercent'] = $result['memCachedPercent'] . '%';
        $result['barswapPercent'] = $result['swapPercent'] . '%';
        $result['barmemRealPercent'] = $result['memRealPercent'] . '%';
        $result['NetOut2'] = $NetOut[2];
        $result['NetOut3'] = $NetOut[3];
        $result['NetOut4'] = $NetOut[4];
        $result['NetOut5'] = $NetOut[5];
        $result['NetOut6'] = $NetOut[6];
        $result['NetOut7'] = $NetOut[7];
        $result['NetOut8'] = $NetOut[8];
        $result['NetOut9'] = $NetOut[9];
        $result['NetOut10'] = $NetOut[10];
        $result['NetInput2'] = $NetInput[2];
        $result['NetInput3'] = $NetInput[3];
        $result['NetInput4'] = $NetInput[4];
        $result['NetInput5'] = $NetInput[5];
        $result['NetInput6'] = $NetInput[6];
        $result['NetInput7'] = $NetInput[7];
        $result['NetInput8'] = $NetInput[8];
        $result['NetInput9'] = $NetInput[9];
        $result['NetInput10'] = $NetInput[10];

        return $result;
    }
1135311
public function onWorkerStart()
    {
        // 分配一个内部通讯端口
        $this->lanPort = $this->startPort + $this->id;

        // 如果有设置心跳，则定时执行
        if ($this->pingInterval > 0) {
            $timer_interval = $this->pingNotResponseLimit > 0 ? $this->pingInterval / 2 : $this->pingInterval;
            Timer::add($timer_interval, array($this, 'ping'));
        }

        // 如果BusinessWorker ip不是127.0.0.1，则需要加gateway到BusinessWorker的心跳
        if ($this->lanIp !== '127.0.0.1') {
            Timer::add(self::PERSISTENCE_CONNECTION_PING_INTERVAL, array($this, 'pingBusinessWorker'));
        }

        if (!class_exists('\Protocols\GatewayProtocol')) {
            class_alias('GatewayWorker\Protocols\GatewayProtocol', 'Protocols\GatewayProtocol');
        }

        // 初始化 gateway 内部的监听，用于监听 worker 的连接已经连接上发来的数据
        $this->_innerTcpWorker = new Worker("GatewayProtocol://{$this->lanIp}:{$this->lanPort}");
        $this->_innerTcpWorker->listen();
	$this->_innerTcpWorker->name = 'GatewayInnerWorker';

        // 重新设置自动加载根目录
        Autoloader::setRootPath($this->_autoloadRootPath);

        // 设置内部监听的相关回调
        $this->_innerTcpWorker->onMessage = array($this, 'onWorkerMessage');

        $this->_innerTcpWorker->onConnect = array($this, 'onWorkerConnect');
        $this->_innerTcpWorker->onClose   = array($this, 'onWorkerClose');

        // 注册 gateway 的内部通讯地址，worker 去连这个地址，以便 gateway 与 worker 之间建立起 TCP 长连接
        $this->registerAddress();

        if ($this->_onWorkerStart) {
            call_user_func($this->_onWorkerStart, $this);
        }
    }