Skip to content

Commit

Permalink
fix(http): fix serverRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
abass-dev committed Oct 6, 2021
1 parent 0aee1f7 commit 718e3e2
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/Diyan.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@
class Diyan extends DiyanNotFoundTemplate implements DiyanInterface
{

/**
* @var ServerRequestInterface
*/
private $request;

/**
* @var string
*/
Expand Down Expand Up @@ -75,7 +80,14 @@ class Diyan extends DiyanNotFoundTemplate implements DiyanInterface
* @var Route
*/
private Route $route;


/**
* @param ServerRequestInterface $request
*/
public function __construct(ServerRequestInterface $request)
{
$this->request = $request;
}
/**
* Get ServerRequest
* @return void
Expand All @@ -91,7 +103,7 @@ public function getDebug()
*/
public function getRequest()
{
return Request::fromGlobals();
return $this->request;
}

/**
Expand Down

0 comments on commit 718e3e2

Please sign in to comment.