* - {host}: Host of the request
* - {method}: Method of the request
* - {uri}: URI of the request
- * - {host}: Host of the request
* - {version}: Protocol version
* - {target}: Request target of the request (path + query + fragment)
* - {hostname}: Hostname of the machine that sent the request
return preg_replace_callback(
'/{\s*([A-Za-z_\-\.0-9]+)\s*}/',
function (array $matches) use ($request, $response, $error, &$cache) {
-
if (isset($cache[$matches[1]])) {
return $cache[$matches[1]];
}