public function Route::addRequirements in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/routing/Route.php \Symfony\Component\Routing\Route::addRequirements()
Adds requirements.
This method implements a fluent interface.
Parameters
array $requirements The requirements:
Return value
Route The current Route instance
1 call to Route::addRequirements()
- Route::setRequirements in vendor/
symfony/ routing/ Route.php - Sets the requirements.
File
- vendor/
symfony/ routing/ Route.php, line 524
Class
- Route
- A Route describes a route and its parameters.
Namespace
Symfony\Component\RoutingCode
public function addRequirements(array $requirements) {
foreach ($requirements as $key => $regex) {
$this->requirements[$key] = $this
->sanitizeRequirement($key, $regex);
}
$this->compiled = null;
return $this;
}