This commit is contained in:
as2252258@163.com
2021-04-24 19:46:24 +08:00
parent 7b8c0dbf63
commit 1867083b14
3 changed files with 385 additions and 376 deletions
+1 -7
View File
@@ -383,13 +383,7 @@ abstract class BaseActiveRecord extends Component implements IOrm, ArrayAccess
*/
public function getAttributes(): array
{
$data = $this->_attributes;
foreach ($this->getAnnotation() as $key => $item) {
if (!isset($data[$key])) continue;
$data[$key] = $this->runAnnotation($key, $data[$key] ?? null);
}
return $data;
return $this->toArray();
}
/**