From d621ad1468206a657ca71716f375bdf1c2cc7a06 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Wed, 20 Apr 2016 08:38:15 +0800 Subject: [PATCH] =?UTF-8?q?Model=E7=B1=BB=E5=A2=9E=E5=8A=A0getData?= =?UTF-8?q?=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Model.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/library/think/Model.php b/library/think/Model.php index f2cde8d9..b43cc4c1 100644 --- a/library/think/Model.php +++ b/library/think/Model.php @@ -161,7 +161,17 @@ abstract class Model implements \JsonSerializable, \ArrayAccess } /** - * 转换为数组 + * 获取对象原始数据 + * @access public + * @return array + */ + public function getData() + { + return $this->data; + } + + /** + * 转换当前模型对象为数组 * @access public * @return array */