From cdbcbbd3211d66603c6c0f01caa9b563b8c50402 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Wed, 28 Apr 2021 11:06:40 +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 --- Database/Base/BaseActiveRecord.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Database/Base/BaseActiveRecord.php b/Database/Base/BaseActiveRecord.php index 519ac0b6..24d1c94a 100644 --- a/Database/Base/BaseActiveRecord.php +++ b/Database/Base/BaseActiveRecord.php @@ -842,6 +842,8 @@ abstract class BaseActiveRecord extends Component implements IOrm, ArrayAccess */ public function __get($name): mixed { + if (Snowflake::app()->has($name)) return Snowflake::getApp($name); + $value = $this->_attributes[$name] ?? null; $method = $this->_get_annotation($name, static::GET); if (!empty($method)) {