function Route::__construct
Same name in this branch
- 11.1.x vendor/symfony/routing/Attribute/Route.php \Symfony\Component\Routing\Attribute\Route::__construct()
- 11.1.x core/modules/migrate/src/Plugin/migrate/process/Route.php \Drupal\migrate\Plugin\migrate\process\Route::__construct()
Constructor.
Available options:
- compiler_class: A class name able to compile this route instance (RouteCompiler by default)
- utf8: Whether UTF-8 matching is enforced ot not
Parameters
string $path The path pattern to match:
array $defaults An array of default parameter values:
array<string|\Stringable> $requirements An array of requirements for parameters (regexes):
array $options An array of options:
string|null $host The host pattern to match:
string|string[] $schemes A required URI scheme or an array of restricted schemes:
string|string[] $methods A required HTTP method or an array of restricted methods:
string|null $condition A condition that should evaluate to true for the route to match:
2 calls to Route::__construct()
- BcRoute::__construct in core/
lib/ Drupal/ Core/ Routing/ BcRoute.php - Constructor.
- BcRoute::__construct in core/
lib/ Drupal/ Core/ Routing/ BcRoute.php - Constructor.
1 method overrides Route::__construct()
- BcRoute::__construct in core/
lib/ Drupal/ Core/ Routing/ BcRoute.php - Constructor.
File
-
vendor/
symfony/ routing/ Route.php, line 49
Class
- Route
- A Route describes a route and its parameters.
Namespace
Symfony\Component\RoutingCode
public function __construct(string $path, array $defaults = [], array $requirements = [], array $options = [], ?string $host = '', string|array $schemes = [], string|array $methods = [], ?string $condition = '') {
$this->setPath($path);
$this->addDefaults($defaults);
$this->addRequirements($requirements);
$this->setOptions($options);
$this->setHost($host);
$this->setSchemes($schemes);
$this->setMethods($methods);
$this->setCondition($condition);
}