src/Router.php
private function _mCall(&$pCall) {
        if (!isset($pCall[self::_MIDDLEWARE]))
            return;
        $is_last = yield;
        foreach ($pCall[self::_MIDDLEWARE] as $callback) {
            if ($this->_delayed) {
                $this->_delayed = false;
                yield;
            }
            if (!($callback($is_last) ?? true))
                break;
        }
        $this->_delayed = false;
    }
private function _mCall(&$pCall) {
        if (!isset($pCall[self::_MIDDLEWARE]))
            return;
        $is_last = yield;
        foreach ($pCall[self::_MIDDLEWARE] as $callback) {
            if ($this->_delayed) {
                $this->_delayed = false;
                yield;
            }
            if (!($callback($is_last) ?? true))
                break;
        }
        $this->_delayed = false;
    }
将中间件回调封装到生成器中待调用

@param $pCall
@return \Generator