This commit is contained in:
xl
2024-11-28 14:35:20 +08:00
parent 60670f7f97
commit c856753992
+6 -3
View File
@@ -4,6 +4,7 @@ defined('APP_PATH') or define('APP_PATH', realpath(__DIR__ . '/../../'));
use JetBrains\PhpStorm\Pure;
use Kiri\Abstracts\Kernel;
use Kiri\Application;
use Kiri\Config\ConfigProvider;
use Kiri\Core\ArrayAccess;
@@ -46,12 +47,14 @@ if (!function_exists('json_validate')) {
if (!function_exists('application')) {
/**
* @param Kernel $Kernel
* @return Application
* @throws
*/
function application(): Application
function application(Kernel $Kernel): Application
{
return Kiri::getDi()->get(Application::class);
$application = Kiri::getDi()->get(Application::class);
$application->commands($Kernel);
return $application;
}
}