src/Leevel/Pipeline/Pipeline.php
protected function traverseGenerator(...$args)
    {
        if (!$this->generator->valid() ||
            $this->generator->next() ||
            !$this->generator->valid()) {
            return;
        }

        array_unshift($args, function (...$args) {
            return $this->traverseGenerator(...$args);
        });

        $current = $this->generator->current();

        // Pipeline 内部创建 [stage, method, params]
        if (is_array($current) && 3 === count($current)) {
            $params = array_pop($current);
        } else {
            $params = [];
        }

        return $current(...$args, ...$params);
    }
protected function traverseGenerator(...$args)
    {
        if (!$this->generator->valid() ||
            $this->generator->next() ||
            !$this->generator->valid()) {
            return;
        }

        array_unshift($args, function (...$args) {
            return $this->traverseGenerator(...$args);
        });

        $current = $this->generator->current();

        // Pipeline 内部创建 [stage, method, params]
        if (is_array($current) && 3 === count($current)) {
            $params = array_pop($current);
        } else {
            $params = [];
        }

        return $current(...$args, ...$params);
    }
遍历迭代器.

@since 2018.01.03

@return mixed