class PathProcessorDecode implements InboundPathProcessorInterface (View source)

Processes the inbound path by urldecoding it.

Parameters in the URL sometimes represent code-meaningful strings. It is therefore useful to always urldecode() those values so that individual controllers need not concern themselves with it. This is Drupal-specific logic and may not be familiar for developers used to other Symfony-family projects.

Revisit whether or not this logic is appropriate for here or if controllers should be required to implement this logic themselves. If we decide to keep this code, remove this TODO.

Methods

string
processInbound(string $path, Request $request)

Processes the inbound path.

Details

string processInbound(string $path, Request $request)

Processes the inbound path.

Implementations may make changes to the request object passed in but should avoid all other side effects. This method can be called to process requests other than the current request.

Parameters

string $path

The path to process, with a leading slash.

Request $request

The HttpRequest object representing the request to process. Note, if this method is being called via the path_processor_manager service and is not part of routing, the current request object must be cloned before being passed in.

Return Value

string

The processed path.