Sets the response content.
Valid types are strings, numbers, and objects that implement a __toString() method.
@api
mixed $content:
\UnexpectedValueException
public function setContent($content) {
if (null !== $content && !is_string($content) && !is_numeric($content) && !is_callable(array(
$content,
'__toString',
))) {
throw new \UnexpectedValueException(sprintf('The Response content must be a string or object implementing __toString(), "%s" given.', gettype($content)));
}
$this->content = (string) $content;
return $this;
}