public function Route::getRequirement

Returns the requirement for the given key.

Parameters

string $key The key:

Return value

string|null The regex or null when not given

1 method overrides Route::getRequirement()
RouteMock::getRequirement in drupal/core/vendor/symfony-cmf/routing/Symfony/Cmf/Component/Routing/Tests/Routing/RouteMock.php
Returns the requirement for the given key.

File

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

Class

Route
A Route describes a route and its parameters.

Namespace

Symfony\Component\Routing

Code

public function getRequirement($key) {
  return isset($this->requirements[$key]) ? $this->requirements[$key] : null;
}