function Headers::getHeaderParameter
File
-
vendor/
symfony/ mime/ Header/ Headers.php, line 286
Class
- Headers
- A collection of headers.
Namespace
Symfony\Component\Mime\HeaderCode
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);
}