public function invoke(
        ControllerContextInterface $context,
        ControllerDispatch $dispatch
    ) {
        /** @var ControllerInterface $controller */
        $controller = $this->createController($dispatch->controllerClass());
        $controller->runWithContext($context);

        $method = $dispatch->handlerMethod();
        $method->invokeArgs($controller, $dispatch->arguments());

        return $controller->data();
    }
public function invoke(
        ControllerContextInterface $context,
        ControllerDispatch $dispatch
    ) {
        /** @var ControllerInterface $controller */
        $controller = $this->createController($dispatch->controllerClass());
        $controller->runWithContext($context);

        $method = $dispatch->handlerMethod();
        $method->invokeArgs($controller, $dispatch->arguments());

        return $controller->data();
    }
public function invoke ( ControllerContextInterface $ context , ControllerDispatch $ dispatch ) { /** @var ControllerInterface $controller */ $ controller = $ this -> createController ( $ dispatch -> controllerClass ( ) ) ; $ controller -> runWithContext ( $ context ) ; $ method = $ dispatch -> handlerMethod ( ) ; $ method -> invokeArgs ( $ controller , $ dispatch -> arguments ( ) ) ; return $ controller -> data ( ) ; }
Invokes the controller action returning view data

@param ControllerContextInterface $context
@param ControllerDispatch $dispatch

@return array
Invokes the controller action returning view data