diff --git a/Header/Headers.php b/Header/Headers.php index 48c73e0..9b963e0 100644 --- a/Header/Headers.php +++ b/Header/Headers.php @@ -244,6 +244,11 @@ public static function checkHeaderClass(HeaderInterface $header): void throw new LogicException(sprintf('The "%s" header must be an instance of "%s" (got "%s").', $header->getName(), implode('" or "', $headerClasses), get_debug_type($header))); } + //php magic function + public function __toString(): string + { + return $this->toString(); + } public function toString(): string { $string = '';