Converts the object into an array.
public toArray ( array $fields = [], array $expand = [], boolean $recursive = true ) : array | ||
$fields | array | the fields that the output array should contain. Fields not specified in [[fields()]] will be ignored. If this parameter is empty, all fields as specified in [[fields()]] will be returned. |
$expand | array | the additional fields that the output array should contain. Fields not specified in [[extraFields()]] will be ignored. If this parameter is empty, no extra fields will be returned. |
$recursive | boolean | whether to recursively return array representation of embedded objects. |
return | array | the array representation of the object |