public function __construct($content, $code, array $headers = []) { $this->content = trim($content); $this->code = intval($code); $this->headers = []; foreach ($headers as $name => $values) { $this->headers[$name] = $values[0]; } }