1 | <?php |
||
7 | abstract class AbstractApiProblem implements ApiProblemInterface |
||
8 | { |
||
9 | /** |
||
10 | * @var string |
||
11 | */ |
||
12 | private $type; |
||
13 | |||
14 | /** |
||
15 | * @var int |
||
16 | */ |
||
17 | private $status; |
||
18 | |||
19 | /** |
||
20 | * @var string |
||
21 | */ |
||
22 | private $title; |
||
23 | |||
24 | /** |
||
25 | * @var string |
||
26 | */ |
||
27 | private $detail; |
||
28 | |||
29 | /** |
||
30 | * @var string|null |
||
31 | */ |
||
32 | private $instance; |
||
33 | |||
34 | /** |
||
35 | * @param string $type |
||
36 | * @param int $status |
||
37 | * @param string $title |
||
38 | * @param string|null $detail |
||
39 | * @param string|null $instance |
||
40 | */ |
||
41 | 2 | public function __construct( |
|
42 | string $type, |
||
43 | int $status, |
||
44 | string $title, |
||
45 | string $detail = null, |
||
46 | string $instance = null |
||
47 | ) { |
||
48 | 2 | $this->type = $type; |
|
49 | 2 | $this->status = $status; |
|
50 | 2 | $this->title = $title; |
|
51 | 2 | $this->detail = $detail; |
|
52 | 2 | $this->instance = $instance; |
|
53 | 2 | } |
|
54 | |||
55 | /** |
||
56 | * @return string |
||
57 | */ |
||
58 | 2 | public function getType(): string |
|
59 | { |
||
60 | 2 | return $this->type; |
|
61 | } |
||
62 | |||
63 | /** |
||
64 | * @return int |
||
65 | */ |
||
66 | 2 | public function getStatus(): int |
|
67 | { |
||
68 | 2 | return $this->status; |
|
69 | } |
||
70 | |||
71 | /** |
||
72 | * @return string |
||
73 | */ |
||
74 | 2 | public function getTitle(): string |
|
75 | { |
||
76 | 2 | return $this->title; |
|
77 | } |
||
78 | |||
79 | /** |
||
80 | * @return string|null |
||
81 | */ |
||
82 | 2 | public function getDetail() |
|
83 | { |
||
84 | 2 | return $this->detail; |
|
85 | } |
||
86 | |||
87 | /** |
||
88 | * @return string|null |
||
89 | */ |
||
90 | 2 | public function getInstance() |
|
94 | |||
95 | /** |
||
96 | * @return array |
||
97 | */ |
||
98 | 2 | public function getHeaders(): array |
|
99 | { |
||
102 | } |
||
103 |