$item =
$item[$key];
} $fieldName = null !==
$root ?
sprintf('%s[%s]',
$root,
$key) :
$key;
if (\
is_array($item)) { array_walk($item,
$prepare,
$fieldName);
return;
} $values[] =
$this->
preparePart($fieldName,
$item);
};
array_walk($fields,
$prepare);
return $values;
} private function preparePart(string
$name, string|TextPart
$value): TextPart
{ if (\
is_string($value)) { return $this->
configurePart($name,
new TextPart($value, 'utf-8', 'plain', '8bit'
));
}