-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Erweiterung der Klassen (nicht fertig)
- Loading branch information
Mirko Fenrich
committed
Jun 16, 2017
1 parent
ef991fb
commit b1f8e14
Showing
3 changed files
with
63 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
namespace Depa\Logger; | ||
|
||
use Interop\Http\ServerMiddleware\DelegateInterface; | ||
use Interop\Http\ServerMiddleware\MiddlewareInterface; | ||
use Psr\Http\Message\ServerRequestInterface; | ||
use Psr\Log\LoggerInterface; | ||
|
||
|
||
|
||
|
||
|
||
class LoggerMiddleware implements MiddlewareInterface | ||
{ | ||
private $zendLogger; | ||
|
||
public function __construct(LoggerInterface $logger) | ||
{ | ||
$this->zendLogger = $logger; | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
public function process(ServerRequestInterface $request, DelegateInterface $delegate) | ||
{ | ||
//was loggen??? | ||
$response = $delegate->process($request); | ||
|
||
|
||
//was loggen? | ||
return $response; | ||
|
||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
namespace Depa\Logger; | ||
|
||
use Interop\Container\ContainerInterface; | ||
|
||
|
||
class LoggerMiddlewareFactory | ||
{ | ||
public function __invoke(ContainerInterface $container) | ||
{ | ||
|
||
|
||
return new LoggerMiddleware(); | ||
} | ||
} |