phpmyadmin/src/Http/Middleware/TrackerEnabling.php
Maurício Meneghini Fauth 5f7d70b536
Move the Middleware namespace into the Http namespace
Middleware is directly related to HTTP.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-09-02 20:18:59 -03:00

23 lines
590 B
PHP

<?php
declare(strict_types=1);
namespace PhpMyAdmin\Http\Middleware;
use PhpMyAdmin\Tracking\Tracker;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\MiddlewareInterface;
use Psr\Http\Server\RequestHandlerInterface;
final class TrackerEnabling implements MiddlewareInterface
{
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
/* Tell tracker that it can actually work */
Tracker::enable();
return $handler->handle($request);
}
}