public function RouteCollection::addRequirements in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/routing/RouteCollection.php \Symfony\Component\Routing\RouteCollection::addRequirements()
Adds requirements to all routes.
An existing requirement under the same name in a route will be overridden.
Parameters
array $requirements An array of requirements:
1 method overrides RouteCollection::addRequirements()
- ChainRouteCollection::addRequirements in vendor/
symfony-cmf/ routing/ ChainRouteCollection.php - Adds requirements to all routes.
File
- vendor/
symfony/ routing/ RouteCollection.php, line 209
Class
- RouteCollection
- A RouteCollection represents a set of Route instances.
Namespace
Symfony\Component\RoutingCode
public function addRequirements(array $requirements) {
if ($requirements) {
foreach ($this->routes as $route) {
$route
->addRequirements($requirements);
}
}
}