1 | <?php declare(strict_types = 1); |
||
20 | class Description implements Visitee, ClosureVisitorScope |
||
21 | { |
||
22 | use VisiteeMixin; |
||
23 | |||
24 | /** |
||
25 | * @var Path[] |
||
26 | */ |
||
27 | protected $paths; |
||
28 | |||
29 | /** |
||
30 | * @var ComplexType[] |
||
31 | */ |
||
32 | protected $complexTypes; |
||
33 | |||
34 | /** |
||
35 | * @var string |
||
36 | */ |
||
37 | protected $host; |
||
38 | |||
39 | /** |
||
40 | * @var array |
||
41 | */ |
||
42 | protected $schemes = []; |
||
43 | |||
44 | /** |
||
45 | * @var array |
||
46 | */ |
||
47 | protected $extensions = []; |
||
48 | |||
49 | /** |
||
50 | * @var Document |
||
51 | */ |
||
52 | protected $document; |
||
53 | |||
54 | /** |
||
55 | * Description constructor. |
||
56 | * |
||
57 | * @param Path[] $paths |
||
58 | * @param ComplexType[] $complexTypes |
||
59 | * @param string $host |
||
60 | * @param array $schemes |
||
61 | * @param array $extensions |
||
62 | * @param Document $document |
||
63 | */ |
||
64 | public function __construct( |
||
79 | |||
80 | /** |
||
81 | * @param string $name |
||
82 | * |
||
83 | * @return mixed |
||
84 | */ |
||
85 | public function getExtension(string $name) |
||
89 | |||
90 | /** |
||
91 | * @return ComplexType[] |
||
92 | */ |
||
93 | public function getComplexTypes(): array |
||
97 | |||
98 | /** |
||
99 | * @return array |
||
100 | */ |
||
101 | public function getSchemes(): array |
||
105 | |||
106 | /** |
||
107 | * @return string|null |
||
108 | */ |
||
109 | public function getHost() |
||
113 | |||
114 | /** |
||
115 | * @param string $path |
||
116 | * |
||
117 | * @return Path |
||
118 | */ |
||
119 | public function getPath(string $path): Path |
||
129 | |||
130 | /** |
||
131 | * @param string $path |
||
132 | * @return bool |
||
133 | */ |
||
134 | public function hasPath(string $path): bool |
||
138 | |||
139 | /** |
||
140 | * @param string $path |
||
141 | * @param string $method |
||
142 | * |
||
143 | * @return Schema |
||
144 | */ |
||
145 | public function getRequestSchema(string $path, string $method): Schema |
||
149 | |||
150 | /** |
||
151 | * @param string $path |
||
152 | * @param string $method |
||
153 | * |
||
154 | * @return Parameter|null |
||
155 | */ |
||
156 | public function getRequestBodyParameter(string $path, string $method) |
||
164 | |||
165 | /** |
||
166 | * @param string $path |
||
167 | * @param string $method |
||
168 | * |
||
169 | * @param int $code |
||
170 | * |
||
171 | * @return Schema |
||
172 | */ |
||
173 | public function getResponseSchema(string $path, string $method, int $code): Schema |
||
177 | |||
178 | /** |
||
179 | * @return Path[] |
||
180 | */ |
||
181 | public function getPaths(): array |
||
185 | |||
186 | /** |
||
187 | * @return Document |
||
188 | */ |
||
189 | public function getDocument(): Document |
||
193 | } |
||
194 |