public function setBody($body, $contentType = null)
{
if ($body !== $this->body) {
$this->clearCache();
}
$this->body = $body;
if (isset($contentType)) {
$this->setContentType($contentType);
}
return $this;
}
/** * Set the body of this entity, either as a string, or as an instance of * {@link Swift_OutputByteStream}. * * @param mixed $body * @param string $contentType optional * @param string $charset optional */ public function setBody($body, $contentType = null, $charset = null) { parent::setBody($body, $contentType); if (isset($charset)) { $this->setCharset($charset); } return $this; }