public function has(string
$name): bool
{ return isset($this->headers
[strtolower($name)]);
} /**
* @return $this
*/
public function add(HeaderInterface
$header):
static { self::
checkHeaderClass($header);
$header->
setMaxLineLength($this->lineLength
);
$name =
strtolower($header->
getName());
if (\
in_array($name, self::UNIQUE_HEADERS, true
) &&
isset($this->headers
[$name]) && \
count($this->headers
[$name]) > 0
) { throw new LogicException(sprintf('Impossible to set header "%s" as it\'s already defined and must be unique.',
$header->
getName()));
} $this->headers
[$name][] =
$header;
return $this;
}