Skip to content

Commit

Permalink
An aktuelles ZendFramework angepasst
Browse files Browse the repository at this point in the history
  • Loading branch information
braesident committed Jun 22, 2018
1 parent c3b10bb commit a348f6b
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/LoggerMiddleware.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<?php
namespace Depa\MiddlewareLogger;

use Interop\Http\ServerMiddleware\DelegateInterface;
use Interop\Http\ServerMiddleware\MiddlewareInterface;
use Psr\Http\Server\MiddlewareInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\RequestHandlerInterface;
use Psr\Http\Message\ResponseInterface;

class LoggerMiddleware implements MiddlewareInterface
{
Expand All @@ -16,10 +17,14 @@ public function __construct( $logger)

/**
* {@inheritDoc}
*
* @param ServerRequestInterface $request
* @param RequestHandlerInterface $handler
* @return ResponseInterface
*/
public function process(ServerRequestInterface $request, DelegateInterface $delegate)
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
$response = $delegate->process($request);
$response = $handler->handle($request);
return $response;
}
}
}

0 comments on commit a348f6b

Please sign in to comment.