From a65d9f6ac15d88dff8cfe907ee5e33ae373907c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Wed, 3 Mar 2021 20:05:08 +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 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/function.php b/function.php index d5d90678..60287efe 100644 --- a/function.php +++ b/function.php @@ -84,12 +84,14 @@ if (!function_exists('recursive_directory')) { return; } - /** @var Attribute $attribute */ + /** @var Attribute $value */ foreach ($annotations['methods'] as $name => $attribute) { - if (!($attribute instanceof Attribute)) { - continue; + foreach ($attribute as $value) { + if (!($value instanceof Attribute)) { + continue; + } + $value->execute([$annotations['handler'], $name]); } - $attribute->execute([$annotations['handler'], $name]); } }