foxygit / foxygit Log in
A tiny read-only git web frontend — browse bare repos with just PHP and git, no database, no framework.
commits tags

/inc/render.php · 392 B

raw
<?php
declare(strict_types=1);

/** The only bridge between index.php (content) and views/ (markup): extracts
 *  $vars into local scope and includes the template. Nothing else in this
 *  file — the boundary itself is meant to stay this small. */
function render(string $view, array $vars = []): void {
    extract($vars, EXTR_SKIP);
    require __DIR__ . '/../views/' . $view . '.php';
}