<?php
namespace Crawl\Lib;

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