Spec-Zone.ru › Symfony 4.1

CollectionConfigurator

class CollectionConfigurator

Свойства

AddTrait
RouteTrait

Методы

RouteConfigurator add(string $name, $path)

Добавляет маршрут.

from AddTrait
RouteConfigurator __invoke(string $name, $path)

Добавляет маршрут.

from AddTrait
$this defaults(array $defaults)

Добавляет значения по умолчанию.

from RouteTrait
$this requirements(array $requirements)

Добавляет требования.

from RouteTrait
$this options(array $options)

Добавляет опции.

from RouteTrait
$this condition(string $condition)

Устанавливает условие.

from RouteTrait
$this host(string $pattern)

Устанавливает шаблон для хоста.

from RouteTrait
$this schemes(array $schemes)

Устанавливает схемы (например, 'https'), к которым ограничен данный маршрут.

from RouteTrait
$this methods(array $methods)

Устанавливает HTTP-методы (например, 'POST'), к которым ограничен данный маршрут.

from RouteTrait
$this controller(callable|string $controller)

Добавляет запись "_controller" в defaults.

from RouteTrait
__construct(RouteCollection $parent, string $name, CollectionConfigurator $parentConfigurator = null, array $parentPrefixes = null)
__destruct()
CollectionConfigurator collection($name = '')

Создаёт подколлекцию.

$this prefix(string|array $prefix)

Устанавливает префикс, который нужно добавить к пути всех дочерних маршрутов.

Подробности

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" в defaults.

Параметры

callable|string $controller callable или парсируемая псевдо-callable

Возвращаемое значение

$this

__construct(RouteCollection $parent, string $name, CollectionConfigurator $parentConfigurator = null, array $parentPrefixes = null)

Параметры

RouteCollection $parent
string $name
CollectionConfigurator $parentConfigurator
array $parentPrefixes

__destruct()

final CollectionConfigurator collection($name = '')

Создаёт подколлекцию.

Параметры

$name

Возвращаемое значение

CollectionConfigurator

final $this prefix(string|array $prefix)

Устанавливает префикс, который нужно добавить к пути всех дочерних маршрутов.

Параметры

string|array $prefix префикс или локализованные префиксы

Возвращаемое значение

$this

© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/Routing/Loader/Configurator/CollectionConfigurator.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API