/
jagepard
/
Rudra-View
Обзор
Документация
Войти
/
jagepard
/
Rudra-View
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/helpers.php
36 строк
938 B
Jagepard
fix: security fixes and PHP 8.4 compatibility
24 июн 2026, 13:30
24 июн 2026, 13:30
35bc991
Код
Авторство
О чём код?
<?php declare(strict_types=1); /** * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. * * @author Korotkov Danila (Jagepard) <jagepard@yandex.ru> * @license https://mozilla.org/MPL/2.0/ MPL-2.0 */ use Rudra\View\ViewFacade as View; if (!function_exists('view')) { function view(string|array $path, array $data = []): string|false { return View::view($path, $data); } } if (!function_exists('render')) { function render(string|array $path, array $data = []): void { $content = View::view($path, $data); if ($content !== false) { echo $content; } } } if (!function_exists('cache')) { function cache(array $path, bool $fullPage = false): ?string { return View::cache($path, $fullPage); } }