You are here

public function RouteCollection::setMethods in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/routing/RouteCollection.php \Symfony\Component\Routing\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:

1 method overrides RouteCollection::setMethods()
ChainRouteCollection::setMethods in vendor/symfony-cmf/routing/ChainRouteCollection.php
Sets the HTTP methods (e.g. 'POST') all child routes are restricted to.

File

vendor/symfony/routing/RouteCollection.php, line 251

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