Files
CMS/app/Core/Response.php
2025-10-28 13:56:54 +01:00

40 lines
722 B
PHP

<?php
namespace App\Core;
class Response
{
private string $body;
private int $status;
/** @var array<string, string> */
private array $headers;
/**
* @param array<string, string> $headers
*/
public function __construct(string $body = '', int $status = 200, array $headers = [])
{
$this->body = $body;
$this->status = $status;
$this->headers = $headers;
}
public function getBody(): string
{
return $this->body;
}
public function getStatus(): int
{
return $this->status;
}
/**
* @return array<string, string>
*/
public function getHeaders(): array
{
return $this->headers;
}
}