class RoutesLoader implements LoaderInterface (View source)

Constants

private MAXIMUM_SUBROUTE_RECURSIONS

The maximum number of recursions when merging subroute configurations.

Methods

__construct(YamlSource $yamlSource, ConfigurationManager $configurationManager)

No description

array
load(array $packages, ApplicationContext $context)

No description

array
includeSubRoutesFromSettings(array $routeDefinitions, array $routeSettings)

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 $packages, ApplicationContext $context, array $routesConfiguration, int $subRoutesRecursionLevel = 0)

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

Details

__construct(YamlSource $yamlSource, ConfigurationManager $configurationManager)

No description

Parameters

YamlSource $yamlSource
ConfigurationManager $configurationManager

array load(array $packages, ApplicationContext $context)

No description

Parameters

array $packages

An array of Package objects (indexed by package key) to consider

ApplicationContext $context

Return Value

array

The Configuration array for the current configurationType

Exceptions

Exception

protected array includeSubRoutesFromSettings(array $routeDefinitions, array $routeSettings)

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
array $routeSettings

Return Value

array

protected array mergeRoutesWithSubRoutes(array $packages, ApplicationContext $context, array $routesConfiguration, int $subRoutesRecursionLevel = 0)

Loads specified sub routes and builds composite routes.

Parameters

array $packages
ApplicationContext $context
array $routesConfiguration
int $subRoutesRecursionLevel

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

Return Value

array

Exceptions

ParseErrorException

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