Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
35 lines (27 sloc) 861 Bytes
namespace Shlinkio\Shlink\Common\Middleware;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\MiddlewareInterface;
use Psr\Http\Server\RequestHandlerInterface;
use Shlinkio\Shlink\Common\Doctrine\ReopeningEntityManager;
class CloseDbConnectionMiddleware implements MiddlewareInterface
/** @var ReopeningEntityManager */
private $em;
public function __construct(ReopeningEntityManager $em)
$this->em = $em;
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
try {
return $handler->handle($request);
} finally {
You can’t perform that action at this time.