diff --git a/function.php b/function.php index 6247dd51..281221e3 100644 --- a/function.php +++ b/function.php @@ -4,6 +4,7 @@ defined('APP_PATH') or define('APP_PATH', realpath(__DIR__ . '/../../')); use JetBrains\PhpStorm\Pure; +use Kiri\Application; use Kiri\Config\ConfigProvider; use Kiri\Core\ArrayAccess; use Kiri\Di\Context; @@ -29,6 +30,20 @@ interface Arrayable } +if (!function_exists('application')) { + + /** + * @return Application + * @throws Exception + */ + function application(): Application + { + return Kiri::getDi()->get(Application::class); + } + +} + + if (!function_exists('make')) { diff --git a/kiri-engine/ToArray.php b/kiri-engine/ToArray.php deleted file mode 100644 index d0df8a00..00000000 --- a/kiri-engine/ToArray.php +++ /dev/null @@ -1,12 +0,0 @@ -