Skip to content

Commit 0e8c7e1

Browse files
committed
Added method to create inbound message from globals.
1 parent 2908ddf commit 0e8c7e1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Message/InboundMessage.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ public function __construct($idOrRequest)
4141
));
4242
}
4343

44+
public static function createFromGlobals()
45+
{
46+
$serverRequest = \Zend\Diactoros\ServerRequestFactory::fromGlobals();
47+
return new self($serverRequest);
48+
}
49+
4450
public function getRequestData($sent = true)
4551
{
4652
$request = $this->getRequest();

0 commit comments

Comments
 (0)