public function toString()
{
if (count($children = $this->getChildren()) > 0 && $this->getBody() != '') {
$this->setChildren(array_merge(array($this->becomeMimePart()), $children));
$string = parent::toString();
$this->setChildren($children);
} else {
$string = parent::toString();
}
return $string;
}
/** * Get this message as a complete string. * * @return string */ public function toString() { if (empty($this->headerSigners) && empty($this->bodySigners)) { return parent::toString(); } $this->saveMessage(); $this->doSign(); $string = parent::toString(); $this->restoreMessage(); return $string; }