From 6b96e54ab01b91c0e16161f93a7d257a840f122a Mon Sep 17 00:00:00 2001 From: whwyy Date: Mon, 18 Dec 2023 15:46:06 +0800 Subject: [PATCH] eee --- Base/Model.php | 2 +- ModelInterface.php | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Base/Model.php b/Base/Model.php index f1cb6ed..c883330 100644 --- a/Base/Model.php +++ b/Base/Model.php @@ -366,7 +366,7 @@ abstract class Model extends Component implements ModelInterface, ArrayAccess, \ */ public function getAttributes(): array { - return $this->toArray(); + return $this->_attributes; } /** diff --git a/ModelInterface.php b/ModelInterface.php index 351a8f3..411dda4 100644 --- a/ModelInterface.php +++ b/ModelInterface.php @@ -97,6 +97,17 @@ interface ModelInterface public function setOldAttribute(string $field): mixed; + /** + * @return array + */ + public function getOldAttributes(): array; + + /** + * @return array + */ + public function getAttributes(): array; + + /** * @return array */