From a3ce9f52ba69443795b979712c706eeee20aa1f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Fri, 3 Dec 2021 18:22:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- function.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/function.php b/function.php index 3b2ae4c3..cbe5dde4 100644 --- a/function.php +++ b/function.php @@ -3,6 +3,7 @@ defined('APP_PATH') or define('APP_PATH', realpath(__DIR__ . '/../../')); +use Http\Handler\Abstracts\MiddlewareManager; use Http\Handler\Router; use JetBrains\PhpStorm\Pure; use Kiri\Abstracts\Config; @@ -52,6 +53,22 @@ if (!function_exists('make')) { } +if (!function_exists('map')) { + + + /** + * @param array $params + * @param Closure $closure + * @return mixed + */ + function map(array $params, Closure $closure): mixed + { + return array_map($closure, $params); + } + +} + + if (!function_exists('checkPortIsAlready')) {