src/mako/http/routing/Router.php
protected function getAllowedMethodsForMatchingRoutes(string $requestPath): array
	{
		$methods = [];

		foreach($this->routes->getRoutes() as $route)
		{
			if($this->matches($route, $requestPath) && $this->constraintsAreSatisfied($route))
			{
				$methods = array_merge($methods, $route->getMethods());
			}
		}

		return array_unique($methods);
	}
protected function getAllowedMethodsForMatchingRoutes(string $requestPath): array
	{
		$methods = [];

		foreach($this->routes->getRoutes() as $route)
		{
			if($this->matches($route, $requestPath) && $this->constraintsAreSatisfied($route))
			{
				$methods = array_merge($methods, $route->getMethods());
			}
		}

		return array_unique($methods);
	}
protected function getAllowedMethodsForMatchingRoutes ( string $ requestPath ) : array { $ methods = [ ] ; foreach ( $ this -> routes -> getRoutes ( ) as $ route ) { if ( $ this -> matches ( $ route , $ requestPath ) && $ this -> constraintsAreSatisfied ( $ route ) ) { $ methods = array_merge ( $ methods , $ route -> getMethods ( ) ) ; } } return array_unique ( $ methods ) ; }
Returns an array of all allowed request methods for the requested route.

@param  string $requestPath The requested path
@return array
Returns an array of all allowed request methods for the requested route .