Classes/Console/Mvc/Controller/CommandController.php
public function processRequest(RequestInterface $request, ResponseInterface $response)
    {
        if (!$request instanceof Request) {
            throw new UnsupportedRequestTypeException(sprintf('%s only supports command line requests – requests of type "%s" given.', static::class, get_class($request)), 1300787096);
        }
        if ($response instanceof Response) {
            $output = $this->objectManager->get(ConsoleOutput::class, $response->getOutput(), $response->getInput());
        }
        $this->output = $output ?? $this->objectManager->get(ConsoleOutput::class);

        $this->request = $request;
        $this->request->setDispatched(true);
        $this->response = $response;

        $this->commandMethodName = $this->resolveCommandMethodName();
        $this->initializeCommandMethodArguments();
        $this->mapRequestArgumentsToControllerArguments();
        $this->callCommandMethod();
    }
public function processRequest(RequestInterface $request, ResponseInterface $response)
    {
        if (!$request instanceof Request) {
            throw new UnsupportedRequestTypeException(sprintf('%s only supports command line requests – requests of type "%s" given.', static::class, get_class($request)), 1300787096);
        }
        if ($response instanceof Response) {
            $output = $this->objectManager->get(ConsoleOutput::class, $response->getOutput(), $response->getInput());
        }
        $this->output = $output ?? $this->objectManager->get(ConsoleOutput::class);

        $this->request = $request;
        $this->request->setDispatched(true);
        $this->response = $response;

        $this->commandMethodName = $this->resolveCommandMethodName();
        $this->initializeCommandMethodArguments();
        $this->mapRequestArgumentsToControllerArguments();
        $this->callCommandMethod();
    }
Processes a command line request.

@param RequestInterface $request The request object
@param ResponseInterface $response The response, modified by this handler
@throws UnsupportedRequestTypeException if the controller doesn't support the current request type
@api