Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
HttpResponse
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3declare(strict_types=1);
4
5namespace PeServer\Core\Http;
6
7use PeServer\Core\Binary;
8use PeServer\Core\Http\HttpHeader;
9use PeServer\Core\Http\HttpStatus;
10use PeServer\Core\Http\ICallbackContent;
11
12/**
13 * HTTP応答データ。
14 */
15class HttpResponse
16{
17    #region variable
18
19    /**
20     * 応答HTTPステータスコード。
21     *
22     * @var HttpStatus
23     */
24    public HttpStatus $status;
25
26    /**
27     * 応答ヘッダ。
28     *
29     * @var HttpHeader
30     */
31    public readonly HttpHeader $header;
32
33    #endregion
34
35    /**
36     * 応答本文。
37     *
38     * @var string|Binary|ICallbackContent|null
39     */
40    public string|Binary|ICallbackContent|null $content = null;
41
42    public function __construct()
43    {
44        $this->status = HttpStatus::None;
45        $this->header = new HttpHeader();
46    }
47}