index/src/Http/HttpResponse.php

35 lines
758 B
PHP

<?php
// HttpResponse.php
// Created: 2022-02-08
// Updated: 2022-02-10
namespace Index\Http;
use Index\Version;
use Index\Http\Content\IHttpContent;
class HttpResponse extends HttpMessage {
private int $statusCode;
private string $statusText;
public function __construct(
Version $version,
int $statusCode,
string $statusText,
HttpHeaders $headers,
?IHttpContent $content
) {
$this->statusCode = $statusCode;
$this->statusText = $statusText;
parent::__construct($version, $headers, $content);
}
public function getStatusCode(): int {
return $this->statusCode;
}
public function getStatusText(): string {
return $this->statusText;
}
}