function TextPart::getBody
2 calls to TextPart::getBody()
- TextPart::bodyToString in vendor/
symfony/ mime/ Part/ TextPart.php - TextPart::__sleep in vendor/
symfony/ mime/ Part/ TextPart.php
1 method overrides TextPart::getBody()
- MessagePart::getBody in vendor/
symfony/ mime/ Part/ MessagePart.php
File
-
vendor/
symfony/ mime/ Part/ TextPart.php, line 125
Class
- TextPart
- @author Fabien Potencier <fabien@symfony.com>
Namespace
Symfony\Component\Mime\PartCode
public function getBody() : string {
if ($this->body instanceof File) {
if (false === ($ret = @file_get_contents($this->body
->getPath()))) {
throw new InvalidArgumentException(error_get_last()['message']);
}
return $ret;
}
if (null === $this->seekable) {
return $this->body;
}
if ($this->seekable) {
rewind($this->body);
}
return stream_get_contents($this->body) ?: '';
}