class RouteConfigurator

Traits

Methods

add(string $name, $path)

Adds a route.

from AddTrait
__invoke(string $name, $path)

Adds a route.

from AddTrait
$this
defaults(array $defaults)

Adds defaults.

$this
requirements(array $requirements)

Adds requirements.

$this
options(array $options)

Adds options.

$this
condition(string $condition)

Sets the condition.

$this
host(string $pattern)

Sets the pattern for the host.

$this
schemes(array $schemes)

Sets the schemes (e.g. 'https') this route is restricted to.

$this
methods(array $methods)

Sets the HTTP methods (e.g. 'POST') this route is restricted to.

$this
controller(callable|string $controller)

Adds the "_controller" entry to defaults.

__construct(RouteCollection $collection, $route, string $name = '', CollectionConfigurator $parentConfigurator = null, array $prefixes = null)

No description

Details

in AddTrait at line 35
final RouteConfigurator add(string $name, $path)

Adds a route.

Parameters

string $name
$path

Return Value

RouteConfigurator

in AddTrait at line 81
final RouteConfigurator __invoke(string $name, $path)

Adds a route.

Parameters

string $name
$path

Return Value

RouteConfigurator

in RouteTrait at line 29
final $this defaults(array $defaults)

Adds defaults.

Parameters

array $defaults

Return Value

$this

in RouteTrait at line 41
final $this requirements(array $requirements)

Adds requirements.

Parameters

array $requirements

Return Value

$this

in RouteTrait at line 53
final $this options(array $options)

Adds options.

Parameters

array $options

Return Value

$this

in RouteTrait at line 65
final $this condition(string $condition)

Sets the condition.

Parameters

string $condition

Return Value

$this

in RouteTrait at line 77
final $this host(string $pattern)

Sets the pattern for the host.

Parameters

string $pattern

Return Value

$this

in RouteTrait at line 92
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

in RouteTrait at line 107
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

in RouteTrait at line 121
final $this controller(callable|string $controller)

Adds the "_controller" entry to defaults.

Parameters

callable|string $controller a callable or parseable pseudo-callable

Return Value

$this

at line 26
__construct(RouteCollection $collection, $route, string $name = '', CollectionConfigurator $parentConfigurator = null, array $prefixes = null)

Parameters

RouteCollection $collection
$route
string $name
CollectionConfigurator $parentConfigurator
array $prefixes