PathProcessorManager
class PathProcessorManager implements InboundPathProcessorInterface, OutboundPathProcessorInterface (View source)
Path processor manager.
Holds an array of path processor objects and uses them to sequentially process a path, in order of processor priority.
Properties
| protected array | $inboundProcessors | Holds the array of inbound processors to cycle through. |
|
| protected array | $sortedInbound | Holds the array of inbound processors, sorted by priority. |
|
| protected array | $outboundProcessors | Holds the array of outbound processors to cycle through. |
|
| protected array | $sortedOutbound | Holds the array of outbound processors, sorted by priority. |
Methods
Adds an inbound processor object to the $inboundProcessors property.
Processes the inbound path.
Returns the sorted array of inbound processors.
Adds an outbound processor object to the $outboundProcessors property.
Processes the outbound path.
Returns the sorted array of outbound processors.
Sorts the processors according to priority.
Details
addInbound(InboundPathProcessorInterface $processor, int $priority = 0)
Adds an inbound processor object to the $inboundProcessors property.
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.
protected array
getInbound()
Returns the sorted array of inbound processors.
addOutbound(OutboundPathProcessorInterface $processor, int $priority = 0)
Adds an outbound processor object to the $outboundProcessors property.
string
processOutbound(string $path, array $options = [], Request $request = NULL, BubbleableMetadata $bubbleable_metadata = NULL)
Processes the outbound path.
protected array
getOutbound()
Returns the sorted array of outbound processors.
protected
sortProcessors(string $type)
Sorts the processors according to priority.