DecoratingEnhancerInterface
interface \
- 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() : 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 $parameters) : void
Executed before invoking routing enhancers.
Parameters
- $collection : RouteCollection
- $parameters : array
-
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() : AspectInterface[]
Return values
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(AspectInterface[] $aspects) : void
Parameters
- $aspects : AspectInterface[]