请问一下array_map([$this,'transform'],$house->toArray())里的[$this,'transform']为何不能写成$this->transform().
private function transformCollection($house){
return array_map([$this,'transform'],$house->toArray());
}
private function transform($house){
return[
'id'=>$house['ID'],
'area'=>$house['Area'],
'b_year'=>$house['BuildYear'],
's_type'=>$house['StructureType'],
'm_type'=>$house['MoveType'],
];
}