diff --git a/function.php b/function.php index c887e49c..adf274d3 100644 --- a/function.php +++ b/function.php @@ -6,6 +6,7 @@ defined('APP_PATH') or define('APP_PATH', realpath(__DIR__ . '/../../')); use JetBrains\PhpStorm\Pure; use Kiri\Abstracts\Kernel; use Kiri\Application; +use Kiri\Error\StdoutLogger; use Kiri\Config\ConfigProvider; use Kiri\Core\ArrayAccess; use Kiri\Di\Context; @@ -45,6 +46,22 @@ if (!function_exists('json_validate')) { } +if (!function_exists('println')) { + + + /** + * @param string $data + * @return bool + */ + function println(string $data): void + { + $logger = \Kiri::getDi()->get(StdoutLogger::class); + $logger->println($data); + } + +} + + if (!function_exists('application')) { /**