From aab8eb0bd8af7436b4db801cb89ab0dd91488e3b Mon Sep 17 00:00:00 2001 From: Angger Pradana Date: Wed, 25 Oct 2023 07:25:13 +0000 Subject: [PATCH] HeaderCollection constructor --- src/System/Http/HeaderCollection.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/System/Http/HeaderCollection.php b/src/System/Http/HeaderCollection.php index 0d6191f7..f7bbf6f8 100644 --- a/src/System/Http/HeaderCollection.php +++ b/src/System/Http/HeaderCollection.php @@ -12,6 +12,16 @@ */ class HeaderCollection extends Collection { + /** + * Header collection. + * + * @param array $headers + */ + public function __construct($headers) + { + parent::__construct($headers); + } + public function __toString() { $headers = $this->clone()->map(fn (string $value, string $key = ''): string => "{$key}: {$value}")->toArray();