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

Breadcrumb

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

function DataPart::__sleep

Overrides TextPart::__sleep

1 method overrides DataPart::__sleep()
MessagePart::__sleep in vendor/symfony/mime/Part/MessagePart.php

File

vendor/symfony/mime/Part/DataPart.php, line 132

Class

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

Namespace

Symfony\Component\Mime\Part

Code

public function __sleep() : array {
    // converts the body to a string
    parent::__sleep();
    $this->_parent = [];
    foreach ([
        'body',
        'charset',
        'subtype',
        'disposition',
        'name',
        'encoding',
    ] as $name) {
        $r = new \ReflectionProperty(TextPart::class, $name);
        $this->_parent[$name] = $r->getValue($this);
    }
    $this->_headers = $this->getHeaders();
    return [
        '_headers',
        '_parent',
        'filename',
        'mediaType',
    ];
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal