public function RouteCollection::setMethods

Sets the HTTP methods (e.g. 'POST') all child routes are restricted to.

Parameters

string|array $methods The method or an array of methods:

File

drupal/core/vendor/symfony/routing/Symfony/Component/Routing/RouteCollection.php, line 245

Class

RouteCollection
A RouteCollection represents a set of Route instances.

Namespace

Symfony\Component\Routing

Code

public function setMethods($methods) {
  foreach ($this->routes as $route) {
    $route
      ->setMethods($methods);
  }
}