private function ApacheMatcherDumper::getRouteMethods in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/routing/Matcher/Dumper/ApacheMatcherDumper.php \Symfony\Component\Routing\Matcher\Dumper\ApacheMatcherDumper::getRouteMethods()
Returns methods allowed for a route.
Parameters
Route $route The route:
Return value
array The methods
1 call to ApacheMatcherDumper::getRouteMethods()
- ApacheMatcherDumper::dumpRoute in vendor/
symfony/ routing/ Matcher/ Dumper/ ApacheMatcherDumper.php - Dumps a single route.
File
- vendor/
symfony/ routing/ Matcher/ Dumper/ ApacheMatcherDumper.php, line 198
Class
- ApacheMatcherDumper
- Dumps a set of Apache mod_rewrite rules.
Namespace
Symfony\Component\Routing\Matcher\DumperCode
private function getRouteMethods(Route $route) {
$methods = $route
->getMethods();
// GET and HEAD are equivalent
if (in_array('GET', $methods) && !in_array('HEAD', $methods)) {
$methods[] = 'HEAD';
}
return $methods;
}