Represents a header containing an optional main value part and subsequent name/value pairs.
If header doesn't contain a non-parameterized 'main' value part, 'getValue()' will return the value of the first parameter.
For example: 'Content-Type: text/html; charset=utf-8; name=test.ext'
The 'text/html' portion is considered the 'main' value, and 'charset' and 'name' are added as parameterized name/value pairs.
With the Autocrypt header, there is no main value portion, for example: 'Autocrypt: addr=zb@example.com; keydata=b64-data'
In that example, calling php $header->getValue()
would return
'zb@example.com', as would calling php $header->getValueFor('addr');
.
- author Zaahid Bateson
Methods |
public __construct(string $name, string $value, ?Psr\Log\LoggerInterface $logger = NULL, ?ZBateson |
public getValueFor(string $name, ?string $defaultValue = NULL) : ?string Returns the value of the parameter with the given name, or $defaultValue if not set.
|
public hasParameter(string $name) : bool Returns true if a parameter exists with the passed name.
|
Properties |
protected array $parameters = []
|
Methods |
protected parseHeaderValue(ZBateson Overridden to assign ParameterParts to a map of lower-case parameter names to ParameterParts. |
Methods |