Pagekit\Mail\Message::prepareAttachment PHP Метод

prepareAttachment() защищенный Метод

Prepare and attach the given attachment.
protected prepareAttachment ( Swift_Mime_Attachment $attachment, string $name = null, string $mime = null ) : self
$attachment Swift_Mime_Attachment
$name string
$mime string
Результат self
    protected function prepareAttachment(Swift_Mime_Attachment $attachment, $name = null, $mime = null)
    {
        if (null !== $mime) {
            $attachment->setContentType($mime);
        }
        if (null !== $name) {
            $attachment->setFilename($name);
        }
        $this->attach($attachment);
        return $this;
    }