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 */