public function callMethod(string $methodName, array $parameters) : Response
    {
        $this->setUpView();
        /** @var Response $response */
        $response = $this->$methodName(...$parameters);

        if ($response === null || is_string($response)) {
            $response = new Response($response === null ? '' : $response);

            if ($this->viewCompiler instanceof ICompiler && $this->view !== null) {
                $response->setContent($this->viewCompiler->compile($this->view));
            }
        }

        return $response;
    }
public function callMethod(string $methodName, array $parameters) : Response
    {
        $this->setUpView();
        /** @var Response $response */
        $response = $this->$methodName(...$parameters);

        if ($response === null || is_string($response)) {
            $response = new Response($response === null ? '' : $response);

            if ($this->viewCompiler instanceof ICompiler && $this->view !== null) {
                $response->setContent($this->viewCompiler->compile($this->view));
            }
        }

        return $response;
    }
public function callMethod ( string $ methodName , array $ parameters ) : Response { $ this -> setUpView ( ) ; /** @var Response $response */ $ response = $ this -> $ methodName ( ... $ parameters ) ; if ( $ response === null || is_string ( $ response ) ) { $ response = new Response ( $ response === null ? '' : $ response ) ; if ( $ this -> viewCompiler instanceof ICompiler && $ this -> view !== null ) { $ response -> setContent ( $ this -> viewCompiler -> compile ( $ this -> view ) ) ; } } return $ response ; }
Actually calls the method in the controller
Rather than calling the method directly from the route dispatcher, call this method

@param string $methodName The name of the method in $this to call
@param array $parameters The list of parameters to pass into the action method
@return Response The HTTP response returned by the method
Actually calls the method in the controller Rather than calling the method directly from the route dispatcher call this method