lithium\net\Message::body()
Add body parts and compile the message body.
Parameters
-
mixed
$data
-
array
$options
'buffer'
integer: split the body string
Returns
arraySource
public function body($data = null, $options = []) {
$default = ['buffer' => null];
$options += $default;
$this->body = array_merge((array) $this->body, (array) $data);
$body = join("\r\n", $this->body);
return ($options['buffer']) ? str_split($body, $options['buffer']) : $body;
}