progetto fatto precedentemente adattato al framework creato con il corso
filippo.bertilotti
2024-06-10 7d7d7a336e8674a54292abe992b260d9cd2db192
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php
 
declare(strict_types= 1);
 
namespace App\Middleware;
 
use Framework\MiddlewareInterface;
use Framework\Request;
use Framework\RequestHandlerInterface;
use Framework\Response;
 
class RedirectExample implements MiddlewareInterface {
 
    public function __construct(private Response $response) {
    }
    public function process(Request $request, RequestHandlerInterface $next) : Response{
        $this->response->redirect("/products/index");
        return $this->response;
    }
}