DecoratingEnhancerInterface extends EnhancerInterface
Decorates a route (or routes within a collection) with additional parameters.
Table of Contents
Methods
- decorateForGeneration() : void
- Decorates route collection during URL URL generation.
- decorateForMatching() : void
- Decorates route collection to be processed during URL resolving.
- getAspects() : array<string|int, AspectInterface>
- getRoutePathRedecorationPattern() : string
- Gets pattern that can be used to redecorate (undecorate) a potential previously decorated route path.
- setAspects() : void
Methods
decorateForGeneration()
Decorates route collection during URL URL generation.
    public
                    decorateForGeneration(RouteCollection $collection, array<string|int, mixed> $parameters) : void
    Executed before invoking routing enhancers.
Parameters
- $collection : RouteCollection
- $parameters : array<string|int, mixed>
- 
                    query parameters 
decorateForMatching()
Decorates route collection to be processed during URL resolving.
    public
                    decorateForMatching(RouteCollection $collection, string $routePath) : void
    Executed before invoking routing enhancers.
Parameters
- $collection : RouteCollection
- $routePath : string
- 
                    URL path 
getAspects()
    public
                    getAspects() : array<string|int, AspectInterface>
    Return values
array<string|int, AspectInterface>getRoutePathRedecorationPattern()
Gets pattern that can be used to redecorate (undecorate) a potential previously decorated route path.
    public
                    getRoutePathRedecorationPattern() : string
    Example:
- route path: 'first/second.html'
- redecoration pattern: '(?:.html|.json)$' -> 'first/second' might be the redecorated route path after applying the redecoration pattern to preg_match/preg_replace
Return values
string —regular expression pattern
setAspects()
    public
                    setAspects(array<string|int, AspectInterface> $aspects) : void
    Parameters
- $aspects : array<string|int, AspectInterface>