From 564e0191e5f9d34969f0b18325636c2f211a0499 Mon Sep 17 00:00:00 2001 From: niqingyang Date: Mon, 11 Dec 2023 23:09:06 +0800 Subject: [PATCH] implement the interface ArrayableInterface for BaseActiveRecord --- src/ActiveRecordInterface.php | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/src/ActiveRecordInterface.php b/src/ActiveRecordInterface.php index 0be43e215..f8a9952b8 100644 --- a/src/ActiveRecordInterface.php +++ b/src/ActiveRecordInterface.php @@ -4,7 +4,6 @@ namespace Yiisoft\ActiveRecord; -use Closure; use Throwable; use Yiisoft\Db\Exception\Exception; use Yiisoft\Db\Exception\InvalidArgumentException; @@ -86,14 +85,6 @@ public function deleteAll(array $condition = []): int; */ public function equals(self $record): bool; - /** - * @return array The default implementation returns the names of the columns whose values have been populated into - * this record. - * - * @psalm-return array - */ - public function fields(): array; - /** * Filters array condition before it's assigned to a Query filter. * @@ -499,19 +490,4 @@ public function getOldAttributes(): array; * @throws InvalidConfigException */ public function populateRecord(array|object $row): void; - - /** - * Serializes the active record into its array implementation with attribute name as a key, and it values as value. - * - * @param array $fields the fields that the output array should contain. Fields not specified - * in {@see fields()} will be ignored. If this parameter is empty, all fields as specified - * in {@see fields()} will be returned. - * @param array $expand the additional fields that the output array should contain. - * Fields not specified in {@see extraFields()} will be ignored. If this parameter is empty, no extra fields - * will be returned. - * @param bool $recursive Whether to recursively return array representation of embedded objects. - * - * @return array The array representation of the object. - */ - public function toArray(array $fields = [], array $expand = [], bool $recursive = true): array; }