src/php/Controllers/BaseController.php
// Renders any given page for the controller or displays 404
Renders any given page for the controller or displays 404
Renders any given page for the controller or displays 404
protected function render(string $page)
    {
        $view = join(DIRECTORY_SEPARATOR, [VIEWS_DIR, $this->controllerName(), "$page.php"]);
        if (file_exists($view)) {
            include $view;
        } else {
            self::renderError("404");
        }
    }
protected function render ( string $ page ) { $ view = join ( DIRECTORY_SEPARATOR , [ VIEWS_DIR , $ this -> controllerName ( ) , " $ page .php " ] ) ; if ( file_exists ( $ view ) ) { include $ view ; } else { self :: renderError ( " 404 " ) ; } }
Renders any given page for the controller or displays 404
Renders any given page for the controller or displays 404