resource|string|null $body:
$this
public function text($body, string $charset = 'utf-8') : static { if (null !== $body && !\is_string($body) && !\is_resource($body)) { throw new \TypeError(\sprintf('The body must be a string, a resource or null (got "%s").', get_debug_type($body))); } $this->cachedBody = null; $this->text = $body; $this->textCharset = $charset; return $this; }