From 4dd427791088d2e17b77b2248fa9cd0edd5b04e2 Mon Sep 17 00:00:00 2001 From: yunwuxin <448901948@qq.com> Date: Fri, 8 Apr 2016 15:26:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Model.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/library/think/Model.php b/library/think/Model.php index 49819f4c..3e102fc8 100644 --- a/library/think/Model.php +++ b/library/think/Model.php @@ -733,4 +733,12 @@ abstract class Model implements \JsonSerializable, \ArrayAccess return call_user_func_array([self::db(), $method], $params); } + /** + * 解序列化后处理 + */ + public function __wakeup() + { + $this->initialize(); + } + }