src/Leevel/Pipeline/Pipeline.php
protected function stageCallback($stages)
    {
        if (null === $stages) {
            return;
        }

        if (is_callable($stages)) {
            return $stages;
        }

        list($stage, $params) = $this->parse($stages);

        if (false !== strpos($stage, '@')) {
            list($stage, $method) = explode('@', $stage);
        } else {
            $method = 'handle';
        }

        if (!is_object($stage = $this->container->make($stage))) {
            throw new InvalidArgumentException('Stage is invalid.');
        }

        return [$stage, $method, $params];
    }
protected function stageCallback($stages)
    {
        if (null === $stages) {
            return;
        }

        if (is_callable($stages)) {
            return $stages;
        }

        list($stage, $params) = $this->parse($stages);

        if (false !== strpos($stage, '@')) {
            list($stage, $method) = explode('@', $stage);
        } else {
            $method = 'handle';
        }

        if (!is_object($stage = $this->container->make($stage))) {
            throw new InvalidArgumentException('Stage is invalid.');
        }

        return [$stage, $method, $params];
    }
工序回调.

@param mixed $stages

@return null|callable