Skip to content
This repository was archived by the owner on Nov 30, 2017. It is now read-only.

Commit d762a38

Browse files
Add usage of ApplicationEnvironmentAwareInterface
1 parent 7d0a7ba commit d762a38

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Psr7Bridge.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace PHPPM\Psr7;
44

5+
use PHPPM\Bootstraps\ApplicationEnvironmentAwareInterface;
56
use PHPPM\Bridges\BridgeInterface;
67
use PHPPM\React\HttpResponse as ReactResponse;
78
use Psr\Http\Message\ResponseInterface as Psr7Response;
@@ -25,6 +26,9 @@ class Psr7Bridge implements BridgeInterface
2526
public function bootstrap($appBootstrap, $appenv, $debug)
2627
{
2728
$this->middleware = new $appBootstrap;
29+
if ($this->middleware instanceof ApplicationEnvironmentAwareInterface) {
30+
$this->middleware->initialize($appenv, $debug);
31+
}
2832
}
2933

3034
/**

0 commit comments

Comments
 (0)