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

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


        
On this page

Search results