headers[$key][] = $value; } /** * {@inheritDoc} */ public function addContent(string $content) { $this->content .= $content; } /** * {@inheritDoc} */ public function getHeaders(): array { return $this->headers; } /** * {@inheritDoc} */ public function getContent(): string { return $this->content; } /** * {@inheritDoc} */ public function setType(string $type) { if (!in_array($type, IRespondToRequests::ALLOWED_TYPES)) { throw new InternalServerErrorException('wrong type'); } $this->type = $type; } /** * {@inheritDoc} */ public function getTyp(): string { return $this->type; } }