lithium\net\Message::body()

public method

Add body parts and compile the message body.

Parameters

  • mixed $data
  • array $options
    • 'buffer' integer: split the body string

Returns

array

Source

	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;
	}