You are here

private function ApacheMatcherDumper::getRouteMethods in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 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\Dumper

Code

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;
}