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

Breadcrumb

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

class AbstractPart

@author Fabien Potencier <fabien@symfony.com>

Hierarchy

  • class \Symfony\Component\Mime\Part\AbstractPart

Expanded class hierarchy of AbstractPart

8 files declare their use of AbstractPart
DkimSigner.php in vendor/symfony/mime/Crypto/DkimSigner.php
DraftEmail.php in vendor/symfony/mime/DraftEmail.php
Email.php in vendor/symfony/mime/Email.php
HttpBrowser.php in vendor/symfony/browser-kit/HttpBrowser.php
HttpClientKernel.php in vendor/symfony/http-kernel/HttpClientKernel.php

... See full list

File

vendor/symfony/mime/Part/AbstractPart.php, line 19

Namespace

Symfony\Component\Mime\Part
View source
abstract class AbstractPart {
    private Headers $headers;
    public function __construct() {
        $this->headers = new Headers();
    }
    public function getHeaders() : Headers {
        return $this->headers;
    }
    public function getPreparedHeaders() : Headers {
        $headers = clone $this->headers;
        $headers->setHeaderBody('Parameterized', 'Content-Type', $this->getMediaType() . '/' . $this->getMediaSubtype());
        return $headers;
    }
    public function toString() : string {
        return $this->getPreparedHeaders()
            ->toString() . "\r\n" . $this->bodyToString();
    }
    public function toIterable() : iterable {
        (yield $this->getPreparedHeaders()
            ->toString());
        (yield "\r\n");
        yield from $this->bodyToIterable();
    }
    public function asDebugString() : string {
        return $this->getMediaType() . '/' . $this->getMediaSubtype();
    }
    public abstract function bodyToString() : string;
    public abstract function bodyToIterable() : iterable;
    public abstract function getMediaType() : string;
    public abstract function getMediaSubtype() : string;

}

Members

Title Sort descending Modifiers Object type Summary Overrides
AbstractPart::$headers private property
AbstractPart::asDebugString public function 2
AbstractPart::bodyToIterable abstract public function 3
AbstractPart::bodyToString abstract public function 3
AbstractPart::getHeaders public function
AbstractPart::getMediaSubtype abstract public function 7
AbstractPart::getMediaType abstract public function 3
AbstractPart::getPreparedHeaders public function 3
AbstractPart::toIterable public function
AbstractPart::toString public function
AbstractPart::__construct public function 3
RSS feed
Powered by Drupal