progetto fatto precedentemente adattato al framework creato con il corso
filippo.bertilotti
2024-06-10 86a7fdf7157d24fa53a871956578ab3cd31ed699
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?php
 
namespace Framework;
 
class PHPTemplateViewer implements TemplateViewerInterface {
    public function render(string $template, array $data = []): string {
        
        echo "PHPTemplateViewer class";
 
        extract($data, EXTR_SKIP);
        ob_start();
 
        require dirname(__DIR__, 2) . "/views/$template";
 
        return ob_get_clean();
    }
}