summaryrefslogtreecommitdiff
path: root/php-src/PSR7Client.php
diff options
context:
space:
mode:
Diffstat (limited to 'php-src/PSR7Client.php')
-rw-r--r--php-src/PSR7Client.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/php-src/PSR7Client.php b/php-src/PSR7Client.php
index f8913a8d..858e8405 100644
--- a/php-src/PSR7Client.php
+++ b/php-src/PSR7Client.php
@@ -64,7 +64,7 @@ class PSR7Client
$bodyStream->write($body);
}
- return new Diactoros\ServerRequest(
+ $request = new Diactoros\ServerRequest(
$_SERVER,
$this->wrapUploads($ctx['uploads']),
$ctx['uri'],
@@ -76,6 +76,14 @@ class PSR7Client
$parsedBody,
$ctx['protocol']
);
+
+ if (!empty($ctx['attributes'])) {
+ foreach ($ctx['attributes'] as $key => $value) {
+ $request = $request->withAttribute($key, $value);
+ }
+ }
+
+ return $request;
}
/**