RouteConfigurator
class RouteConfigurator
Свойства
| AddTrait | |
| RouteTrait |
Методы
| RouteConfigurator | add(string $name, $path) Добавляет маршрут. | из AddTrait |
| RouteConfigurator | __invoke(string $name, $path) Добавляет маршрут. | из AddTrait |
| $this | defaults(array $defaults) Добавляет значения по умолчанию. | из RouteTrait |
| $this | requirements(array $requirements) Добавляет требования. | из RouteTrait |
| $this | options(array $options) Добавляет параметры. | из RouteTrait |
| $this | condition(string $condition) Устанавливает условие. | из RouteTrait |
| $this | host(string $pattern) Устанавливает шаблон для хоста. | из RouteTrait |
| $this | schemes(array $schemes) Устанавливает схемы (например, 'https'), к которым ограничен данный маршрут. Пустой массив означает, что разрешены любые схемы. | из RouteTrait |
| $this | methods(array $methods) Устанавливает HTTP-методы (например, 'POST'), к которым ограничен данный маршрут. Пустой массив означает, что разрешены любые методы. | из RouteTrait |
| $this | controller(callable|string $controller) Добавляет запись "_controller" в значения по умолчанию. | из RouteTrait |
| __construct(RouteCollection $collection, $route, string $name = '', CollectionConfigurator $parentConfigurator = null, array $prefixes = null) |
Подробности
final RouteConfigurator add(string $name, $path)
Добавляет маршрут.
Параметры
| string | $name | |
| $path |
Возвращаемое значение
| RouteConfigurator |
final RouteConfigurator __invoke(string $name, $path)
Добавляет маршрут.
Параметры
| string | $name | |
| $path |
Возвращаемое значение
| RouteConfigurator |
final $this defaults(array $defaults)
Добавляет значения по умолчанию.
Параметры
| array | $defaults |
Возвращаемое значение
| $this |
final $this requirements(array $requirements)
Добавляет требования.
Параметры
| array | $requirements |
Возвращаемое значение
| $this |
final $this options(array $options)
Добавляет параметры.
Параметры
| array | $options |
Возвращаемое значение
| $this |
final $this condition(string $condition)
Устанавливает условие.
Параметры
| string | $condition |
Возвращаемое значение
| $this |
final $this host(string $pattern)
Устанавливает шаблон для хоста.
Параметры
| string | $pattern |
Возвращаемое значение
| $this |
final $this schemes(array $schemes)
Устанавливает схемы (например, 'https'), к которым ограничен данный маршрут.
Пустой массив означает, что разрешены любые схемы.
Параметры
| array | $schemes |
Возвращаемое значение
| $this |
final $this methods(array $methods)
Устанавливает HTTP-методы (например, 'POST'), к которым ограничен данный маршрут.
Пустой массив означает, что разрешены любые методы.
Параметры
| array | $methods |
Возвращаемое значение
| $this |
final $this controller(callable|string $controller)
Добавляет запись "_controller" в значения по умолчанию.
Параметры
| callable|string | $controller | callable или разбираемая псевдо-callable |
Возвращаемое значение
| $this |
__construct(RouteCollection $collection, $route, string $name = '', CollectionConfigurator $parentConfigurator = null, array $prefixes = null)
Параметры
| RouteCollection | $collection | |
| $route | ||
| string | $name | |
| CollectionConfigurator | $parentConfigurator | |
| array | $prefixes |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/Routing/Loader/Configurator/RouteConfigurator.html