class RouteConfigurationProcessor (View source)

Constants

MAXIMUM_SUBROUTE_RECURSIONS

The maximum number of recursions when merging subroute configurations.

Properties

protected int $subRoutesRecursionLevel

Counts how many SubRoutes have been loaded. If this number exceeds MAXIMUM_SUBROUTE_RECURSIONS, an exception is thrown

protected array $routeSettings
protected array $orderedListOfContextNames
protected Package[] $packages
protected YamlSource $configurationSource

Methods

__construct(array $routeSettings, array $orderedListOfContextNames, array $packages, $configurationSource)

RouteConfigurationProcessor constructor.

array
process($routeDefinitions)

No description

array
includeSubRoutesFromSettings(array $routeDefinitions)

Merges routes from Neos.Flow.mvc.routes settings into $routeDefinitions NOTE: Routes from settings will always be appended to existing route definitions from the main Routes configuration!

array
mergeRoutesWithSubRoutes(array $routesConfiguration)

Loads specified sub routes and builds composite routes.

array
buildSubRouteConfigurations(array $routesConfiguration, array $subRoutesConfiguration, string $subRouteKey, array $subRouteOptions)

Merges all routes in $routesConfiguration with the sub routes in $subRoutesConfiguration

string
replacePlaceholders(string $string, array $variables)

Replaces placeholders in the format with the corresponding variable of the specified $variables collection.

Details

__construct(array $routeSettings, array $orderedListOfContextNames, array $packages, $configurationSource)

RouteConfigurationProcessor constructor.

Parameters

array $routeSettings
array $orderedListOfContextNames
array $packages
$configurationSource

array process($routeDefinitions)

No description

Parameters

$routeDefinitions

Return Value

array

Exceptions

ParseErrorException
RecursionException

protected array includeSubRoutesFromSettings(array $routeDefinitions)

Merges routes from Neos.Flow.mvc.routes settings into $routeDefinitions NOTE: Routes from settings will always be appended to existing route definitions from the main Routes configuration!

Parameters

array $routeDefinitions

Return Value

array

protected array mergeRoutesWithSubRoutes(array $routesConfiguration)

Loads specified sub routes and builds composite routes.

Parameters

array $routesConfiguration

Return Value

array

Exceptions

ParseErrorException
RecursionException

protected array buildSubRouteConfigurations(array $routesConfiguration, array $subRoutesConfiguration, string $subRouteKey, array $subRouteOptions)

Merges all routes in $routesConfiguration with the sub routes in $subRoutesConfiguration

Parameters

array $routesConfiguration
array $subRoutesConfiguration
string $subRouteKey

the key of the sub route:

array $subRouteOptions

Return Value

array

the merged route configuration

Exceptions

ParseErrorException

protected string replacePlaceholders(string $string, array $variables)

Replaces placeholders in the format with the corresponding variable of the specified $variables collection.

Parameters

string $string
array $variables

Return Value

string