From dc597a3ca0cbf101f0bdae086bfffe32dcd03cfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Thu, 25 Mar 2021 18:08:13 +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 --- Gii/GiiModel.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Gii/GiiModel.php b/Gii/GiiModel.php index 216ee929..96f0c6ab 100644 --- a/Gii/GiiModel.php +++ b/Gii/GiiModel.php @@ -162,7 +162,7 @@ use Database\ActiveRecord; $out = ['rules', 'tableName', 'attributes']; if (is_object($class)) { - $methods = $class->getMethods(\ReflectionMethod::IS_PUBLIC); + $methods = $class->getMethods(); $classFileName = str_replace(APP_PATH, '', $class->getFileName()); @@ -176,7 +176,8 @@ use Database\ActiveRecord; $attributes = $val->getAttributes(); if (!empty($attributes)) { foreach ($attributes as $attribute) { - $over .= " #[\\" . $attribute->getName() . "('" . implode('\',\'', $attribute->getArguments()) . "')] + $explode = explode('\\', $attribute->getName()); + $over .= " #[" . env($explode) . "('" . implode('\',\'', $attribute->getArguments()) . "')] "; } }