Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Email.php

function Email::__serialize

@internal

Overrides Message::__serialize

File

vendor/symfony/mime/Email.php, line 554

Class

Email
@author Fabien Potencier <fabien@symfony.com>

Namespace

Symfony\Component\Mime

Code

public function __serialize() : array {
    if (\is_resource($this->text)) {
        $this->text = (new TextPart($this->text))
            ->getBody();
    }
    if (\is_resource($this->html)) {
        $this->html = (new TextPart($this->html))
            ->getBody();
    }
    return [
        $this->text,
        $this->textCharset,
        $this->html,
        $this->htmlCharset,
        $this->attachments,
        parent::__serialize(),
    ];
}
RSS feed
Powered by Drupal