src/mako/http/routing/Dispatcher.php
public function dispatch(Route $route): Response
	{
		$onion = new Onion($this->container, null, MiddlewareInterface::class);

		$this->addMiddlewareToStack($onion, array_merge($this->globalMiddleware, $route->getMiddleware()));

		return $onion->peel(function() use ($route)
		{
			return $this->executeAction($route);
		}, [$this->request, $this->response]);
	}
public function dispatch(Route $route): Response
	{
		$onion = new Onion($this->container, null, MiddlewareInterface::class);

		$this->addMiddlewareToStack($onion, array_merge($this->globalMiddleware, $route->getMiddleware()));

		return $onion->peel(function() use ($route)
		{
			return $this->executeAction($route);
		}, [$this->request, $this->response]);
	}
public function dispatch ( Route $ route ) : Response { $ onion = new Onion ( $ this -> container , null , MiddlewareInterface :: class ) ; $ this -> addMiddlewareToStack ( $ onion , array_merge ( $ this -> globalMiddleware , $ route -> getMiddleware ( ) ) ) ; return $ onion -> peel ( function ( ) use ( $ route ) { return $ this -> executeAction ( $ route ) ; } , [ $ this -> request , $ this -> response ] ) ; }
Dispatches the route and returns the response.

@param  \mako\http\routing\Route $route Route
@return \mako\http\Response
Dispatches the route and returns the response .