Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2
3// ╔════════════════════════════════════════════════════════════╗
4// ║ MIT Licence (#Expat) - https://opensource.org/licenses/MIT ║
5// ║ Copyright 2026 Frederic Poeydomenge <dyno@phexium.com>     ║
6// ╚════════════════════════════════════════════════════════════╝
7
8declare(strict_types=1);
9
10namespace Phexium\Presentation;
11
12use Psr\Http\Message\ResponseInterface;
13
14interface ResponseBuilderInterface
15{
16    public function withResponse(ResponseInterface $response): self;
17
18    public function withHeader(string $name, string $value): self;
19
20    public function addHeader(string $name, string $value): self;
21
22    public function withStatus(int $code): self;
23
24    public function withHtml(string $html, string $charset = 'utf-8'): self;
25
26    public function withJson(array $data, string $charset = 'utf-8'): self;
27
28    public function build(): ResponseInterface;
29}