dashboard
repositories
filestore
activity
search
login
Filippo Bertilotti
/
corso1
corso https://vola.udemy.com/course/php-mvc-from-scratch/learn/lecture/40931984#overview
summary
reflog
commits
tree
docs
forks
compare
blame
|
history
|
raw
aggiunta strict type per evitare errori sui tipi (parte 93)
filippo.bertilotti
2024-05-15
e3d936b79bfe45c9dbe5ecdae467ac7ef8bf24b3
[~fbertilotti/corso1.git]
/
src
/
Framework
/
Viewer.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?php
namespace Framework;
class Viewer {
public function render(string $template, array $data = []): string {
extract($data, EXTR_SKIP);
ob_start();
require "views/$template";
return ob_get_clean();
}
}