/**
* Returns the routing traces associated to the given request.
*/
private function getTraces(RequestDataCollector
$request, string
$method): array
{ $traceRequest = Request::
create( $request->
getPathInfo(),
$request->
getRequestServer(true
)->
get('REQUEST_METHOD'
),
\
in_array($request->
getMethod(),
['DELETE', 'PATCH', 'POST', 'PUT'
], true
) ?
$request->
getRequestRequest()->
all() :
$request->
getRequestQuery()->
all(),
$request->
getRequestCookies(true
)->
all(),
[],
$request->
getRequestServer(true
)->
all() );
$context =
$this->matcher->
getContext();
$context->
setMethod($method);
$matcher =
new TraceableUrlMatcher($this->routes,
$context);
foreach ($this->expressionLanguageProviders
as $provider) { $matcher->
addExpressionLanguageProvider($provider);
}