Skip to content

Commit c908fcc

Browse files
ichynulliu21st
authored andcommitted
修改 getRelationMapAttr 为 getAttrOfRelationMap
1 parent c2afcee commit c908fcc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/model/View.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ protected function initData(bool $with = false)
6262
$this->$field = $this->fetchViewAttr($field, $data, $with);
6363
} elseif (strpos($field, '->')) {
6464
// 关联属性或JSON字段映射
65-
$this->$key = $this->getRelationMapAttr($field, $data);
65+
$this->$key = $this->getAttrOfRelationMap($field, $data);
6666
} else {
6767
// 主模型属性映射
6868
$this->$key = $this->fetchViewAttr($field, $data, $with);
@@ -80,7 +80,7 @@ protected function initData(bool $with = false)
8080
*
8181
* @return mixed
8282
*/
83-
private function getRelationMapAttr(string $field, array $data)
83+
private function getAttrOfRelationMap(string $field, array $data)
8484
{
8585
$items = explode('->', $field);
8686
$relation = array_shift($items);

0 commit comments

Comments
 (0)