src/mako/http/routing/Dispatcher.php
protected function resolveMiddleware(string $middleware): array
	{
		[$name, $parameters] = $this->parseFunction($middleware);

		if(!isset($this->middleware[$name]))
		{
			throw new RuntimeException(vsprintf('No middleware named [ %s ] has been registered.', [$middleware]));
		}

		return ['name' => $name, 'middleware' => $this->middleware[$name], 'parameters' => $parameters];
	}
protected function resolveMiddleware(string $middleware): array
	{
		[$name, $parameters] = $this->parseFunction($middleware);

		if(!isset($this->middleware[$name]))
		{
			throw new RuntimeException(vsprintf('No middleware named [ %s ] has been registered.', [$middleware]));
		}

		return ['name' => $name, 'middleware' => $this->middleware[$name], 'parameters' => $parameters];
	}
protected function resolveMiddleware ( string $ middleware ) : array { [ $ name , $ parameters ] = $ this -> parseFunction ( $ middleware ) ; if ( ! isset ( $ this -> middleware [ $ name ] ) ) { throw new RuntimeException ( vsprintf ( 'No middleware named [ %s ] has been registered.' , [ $ middleware ] ) ) ; } return [ 'name' => $ name , 'middleware' => $ this -> middleware [ $ name ] , 'parameters' => $ parameters ] ; }
Resolves the middleware.

@param  string            $middleware middleware
@throws \RuntimeException
@return array
Resolves the middleware .