You are here

public function Route::setRequirements in Zircon Profile 8

Same name in this branch
  1. 8 vendor/symfony/routing/Route.php \Symfony\Component\Routing\Route::setRequirements()
  2. 8 vendor/symfony/routing/Annotation/Route.php \Symfony\Component\Routing\Annotation\Route::setRequirements()
Same name and namespace in other branches
  1. 8.0 vendor/symfony/routing/Route.php \Symfony\Component\Routing\Route::setRequirements()

Sets the requirements.

This method implements a fluent interface.

Parameters

array $requirements The requirements:

Return value

Route The current Route instance

1 call to Route::setRequirements()
Route::__construct in vendor/symfony/routing/Route.php
Constructor.

File

vendor/symfony/routing/Route.php, line 508

Class

Route
A Route describes a route and its parameters.

Namespace

Symfony\Component\Routing

Code

public function setRequirements(array $requirements) {
  $this->requirements = array();
  return $this
    ->addRequirements($requirements);
}