<?php
namespace Analytics\Lib;

class View
{
    public static function render(string $view, array $data = []): void
    {
        extract($data, EXTR_SKIP);
        require ANALYTICS_VIEWS . '/layout/header.php';
        require ANALYTICS_VIEWS . '/' . $view . '.php';
        require ANALYTICS_VIEWS . '/layout/footer.php';
    }
}

