шаг 1 сделан

This commit is contained in:
Alisa
2026-06-03 23:12:10 +03:00
parent 891315780f
commit 6d7ef09c5b
21 changed files with 658 additions and 34 deletions
+28
View File
@@ -0,0 +1,28 @@
<?php
declare(strict_types=1);
use App\Core\View;
function app_env(string $key, ?string $default = null): ?string
{
$value = $_ENV[$key] ?? getenv($key);
if ($value === false || $value === null) {
return $default;
}
return (string) $value;
}
function base_path(string $path = ''): string
{
$base = dirname(__DIR__);
return $path === '' ? $base : $base . '/' . ltrim($path, '/');
}
function view(string $template, array $data = []): void
{
View::render($template, $data);
}