public function Route::getRequirement in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/routing/Route.php \Symfony\Component\Routing\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 vendor/
symfony-cmf/ routing/ Tests/ Routing/ RouteMock.php - Returns the requirement for the given key.
File
- vendor/
symfony/ routing/ Route.php, line 541
Class
- Route
- A Route describes a route and its parameters.
Namespace
Symfony\Component\RoutingCode
public function getRequirement($key) {
if ('_scheme' === $key) {
@trigger_error('The "_scheme" requirement is deprecated since version 2.2 and will be removed in 3.0. Use getSchemes() instead.', E_USER_DEPRECATED);
}
elseif ('_method' === $key) {
@trigger_error('The "_method" requirement is deprecated since version 2.2 and will be removed in 3.0. Use getMethods() instead.', E_USER_DEPRECATED);
}
return isset($this->requirements[$key]) ? $this->requirements[$key] : null;
}