src/mako/http/routing/Router.php
protected function optionsRoute(string $requestPath): Route
	{
		$allowedMethods = $this->getAllowedMethodsForMatchingRoutes($requestPath);

		return new Route([], '', function(Response $response) use ($allowedMethods): void
		{
			$response->getHeaders()->add('Allow', implode(',', $allowedMethods));
		});
	}
protected function optionsRoute(string $requestPath): Route
	{
		$allowedMethods = $this->getAllowedMethodsForMatchingRoutes($requestPath);

		return new Route([], '', function(Response $response) use ($allowedMethods): void
		{
			$response->getHeaders()->add('Allow', implode(',', $allowedMethods));
		});
	}
protected function optionsRoute ( string $ requestPath ) : Route { $ allowedMethods = $ this -> getAllowedMethodsForMatchingRoutes ( $ requestPath ) ; return new Route ( [ ] , '' , function ( Response $ response ) use ( $ allowedMethods ) : void { $ response -> getHeaders ( ) -> add ( 'Allow' , implode ( ',' , $ allowedMethods ) ) ; } ) ; }
Returns a route with a closure action that sets the allow header.

@param  string                   $requestPath The requested path
@return \mako\http\routing\Route
Returns a route with a closure action that sets the allow header .