$meta */ protected function view(string $page, array $meta = [], bool $layout = true): void { $viewFile = BSB_BASE . '/app/Views/pages/' . $page . '.php'; if (!is_file($viewFile)) { http_response_code(500); echo 'View fehlt: ' . htmlspecialchars($page, ENT_QUOTES); return; } if (!$layout) { require $viewFile; return; } // Variablen für app/Views/layout.php $title = (string) ($meta['title'] ?? 'Black Sheep Bluff'); $description = (string) ($meta['description'] ?? ''); $cssFiles = (array) ($meta['css'] ?? []); $jsFiles = (array) ($meta['js'] ?? []); $bodyClass = (string) ($meta['bodyClass'] ?? ''); require BSB_BASE . '/app/Views/layout.php'; } }