RouteConfigurator
class RouteConfigurator
Traits
| AddTrait | |
| RouteTrait |
Methods
| RouteConfigurator | add($name, $path) Adds a route. | from AddTrait |
| RouteConfigurator | __invoke(string $name, string $path) Adds a route. | from AddTrait |
| $this | defaults(array $defaults) Adds defaults. | from RouteTrait |
| $this | requirements(array $requirements) Adds requirements. | from RouteTrait |
| $this | options(array $options) Adds options. | from RouteTrait |
| $this | condition(string $condition) Sets the condition. | from RouteTrait |
| $this | host(string $pattern) Sets the pattern for the host. | from RouteTrait |
| $this | schemes(array $schemes) Sets the schemes (e.g. 'https') this route is restricted to. | from RouteTrait |
| $this | methods(array $methods) Sets the HTTP methods (e.g. 'POST') this route is restricted to. | from RouteTrait |
| $this | controller(callable $controller) Adds the "_controller" entry to defaults. | from RouteTrait |
| __construct(RouteCollection $collection, Route $route, $name = '') |
Details
final RouteConfigurator add($name, $path)
Adds a route.
Parameters
| $name | ||
| $path |
Return Value
| RouteConfigurator |
final RouteConfigurator __invoke(string $name, string $path)
Adds a route.
Parameters
| string | $name | |
| string | $path |
Return Value
| RouteConfigurator |
final $this defaults(array $defaults)
Adds defaults.
Parameters
| array | $defaults |
Return Value
| $this |
final $this requirements(array $requirements)
Adds requirements.
Parameters
| array | $requirements |
Return Value
| $this |
final $this options(array $options)
Adds options.
Parameters
| array | $options |
Return Value
| $this |
final $this condition(string $condition)
Sets the condition.
Parameters
| string | $condition |
Return Value
| $this |
final $this host(string $pattern)
Sets the pattern for the host.
Parameters
| string | $pattern |
Return Value
| $this |
final $this schemes(array $schemes)
Sets the schemes (e.g. 'https') this route is restricted to.
So an empty array means that any scheme is allowed.
Parameters
| array | $schemes |
Return Value
| $this |
final $this methods(array $methods)
Sets the HTTP methods (e.g. 'POST') this route is restricted to.
So an empty array means that any method is allowed.
Parameters
| array | $methods |
Return Value
| $this |
final $this controller(callable $controller)
Adds the "_controller" entry to defaults.
Parameters
| callable | $controller | a callable or parseable pseudo-callable |
Return Value
| $this |
__construct(RouteCollection $collection, Route $route, $name = '')
Parameters
| RouteCollection | $collection | |
| Route | $route | |
| $name |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.4/Symfony/Component/Routing/Loader/Configurator/RouteConfigurator.html