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

Breadcrumb

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

function Headers::getHeaderParameter

File

vendor/symfony/mime/Header/Headers.php, line 286

Class

Headers
A collection of headers.

Namespace

Symfony\Component\Mime\Header

Code

public function getHeaderParameter(string $name, string $parameter) : ?string {
    if (!$this->has($name)) {
        return null;
    }
    $header = $this->get($name);
    if (!$header instanceof ParameterizedHeader) {
        throw new LogicException(\sprintf('Unable to get parameter "%s" on header "%s" as the header is not of class "%s".', $parameter, $name, ParameterizedHeader::class));
    }
    return $header->getParameter($parameter);
}
RSS feed
Powered by Drupal