public function Route::hasRequirement

Checks if a requirement is set for the given key.

Parameters

string $key A variable name:

Return value

Boolean true if a requirement is specified, false otherwise

File

drupal/core/vendor/symfony/routing/Symfony/Component/Routing/Route.php, line 523

Class

Route
A Route describes a route and its parameters.

Namespace

Symfony\Component\Routing

Code

public function hasRequirement($key) {
  return array_key_exists($key, $this->requirements);
}