<?php
class View {
    public function render($view, $data = []) {
        // extract($data);
        // require VIEW_DIR. '/'. $view. '.php';

        extract($data);
        ob_start();
        require VIEW_DIR. '/'. $view. '.php';
        $content = ob_get_clean();
        $styles = $data['styles'];
        require VIEW_DIR. '/layout.php';
    }
}