if ($this->request instanceof CLIRequest
) { return md5($this->request->
getPath());
} $uri =
clone $this->request->
getUri();
$query =
$config->cacheQueryString
?
$uri->
getQuery(is_array($config->cacheQueryString
) ?
['only' =>
$config->cacheQueryString
] :
[]) : '';
return md5($uri->
setFragment(''
)->
setQuery($query));
} /**
* Replaces the elapsed_time tag.
*/
public function displayPerformanceMetrics(string
$output): string
{ return str_replace('{elapsed_time}',
(string) $this->totalTime,
$output);
} /**
* Try to Route It - As it sounds like, works with the router to
* match a route against the current URI. If the route is a
* "redirect route", will also handle the redirect.
*
* @param RouteCollectionInterface|null $routes An collection interface to use in place
* of the config file.
*
* @return string|string[]|null Route filters, that is, the filters specified in the routes file
*
* @throws RedirectException
*/