Documentation

ImportConfigurator
in package
Uses HostTrait, PrefixTrait, RouteTrait

Tags
author

Nicolas Grekas p@tchwork.com

Table of Contents

$route  : RouteCollection|Route
$parent  : mixed
__construct()  : mixed
__destruct()  : mixed
__sleep()  : array<string|int, mixed>
__wakeup()  : mixed
condition()  : $this
Sets the condition.
controller()  : $this
Adds the "_controller" entry to defaults.
defaults()  : $this
Adds defaults.
format()  : $this
Adds the "_format" entry to defaults.
host()  : $this
Sets the host to use for all child routes.
locale()  : $this
Adds the "_locale" entry to defaults.
methods()  : $this
Sets the HTTP methods (e.g. 'POST') this route is restricted to.
namePrefix()  : $this
Sets the prefix to add to the name of all child routes.
options()  : $this
Adds options.
prefix()  : $this
Sets the prefix to add to the path of all child routes.
requirements()  : $this
Adds requirements.
schemes()  : $this
Sets the schemes (e.g. 'https') this route is restricted to.
stateless()  : $this
Adds the "_stateless" entry to defaults.
utf8()  : $this
Whether paths should accept utf8 encoding.

Properties

Methods

__sleep()

public __sleep() : array<string|int, mixed>
Return values
array<string|int, mixed>

condition()

Sets the condition.

public final condition(string $condition) : $this
Parameters
$condition : string
Return values
$this

controller()

Adds the "_controller" entry to defaults.

public final controller(callable|string|array<string|int, mixed> $controller) : $this
Parameters
$controller : callable|string|array<string|int, mixed>

a callable or parseable pseudo-callable

Return values
$this

defaults()

Adds defaults.

public final defaults(array<string|int, mixed> $defaults) : $this
Parameters
$defaults : array<string|int, mixed>
Return values
$this

format()

Adds the "_format" entry to defaults.

public final format(string $format) : $this
Parameters
$format : string
Return values
$this

host()

Sets the host to use for all child routes.

public final host(string|array<string|int, mixed> $host) : $this
Parameters
$host : string|array<string|int, mixed>

the host, or the localized hosts

Return values
$this

locale()

Adds the "_locale" entry to defaults.

public final locale(string $locale) : $this
Parameters
$locale : string
Return values
$this

methods()

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

public final methods(array<string|int, string> $methods) : $this

So an empty array means that any method is allowed.

Parameters
$methods : array<string|int, string>
Return values
$this

namePrefix()

Sets the prefix to add to the name of all child routes.

public final namePrefix(string $namePrefix) : $this
Parameters
$namePrefix : string
Return values
$this

options()

Adds options.

public final options(array<string|int, mixed> $options) : $this
Parameters
$options : array<string|int, mixed>
Return values
$this

prefix()

Sets the prefix to add to the path of all child routes.

public final prefix(string|array<string|int, mixed> $prefix[, bool $trailingSlashOnRoot = true ]) : $this
Parameters
$prefix : string|array<string|int, mixed>

the prefix, or the localized prefixes

$trailingSlashOnRoot : bool = true
Return values
$this

requirements()

Adds requirements.

public final requirements(array<string|int, mixed> $requirements) : $this
Parameters
$requirements : array<string|int, mixed>
Return values
$this

schemes()

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

public final schemes(array<string|int, string> $schemes) : $this

So an empty array means that any scheme is allowed.

Parameters
$schemes : array<string|int, string>
Return values
$this

stateless()

Adds the "_stateless" entry to defaults.

public final stateless([bool $stateless = true ]) : $this
Parameters
$stateless : bool = true
Return values
$this

utf8()

Whether paths should accept utf8 encoding.

public final utf8([bool $utf8 = true ]) : $this
Parameters
$utf8 : bool = true
Return values
$this

Search results