1 | <?php declare(strict_types = 1); |
||
17 | class Operation implements Element |
||
18 | { |
||
19 | use VisiteeMixin; |
||
20 | |||
21 | /** |
||
22 | * @var string |
||
23 | */ |
||
24 | protected $id; |
||
25 | |||
26 | |||
27 | /** |
||
28 | * @var string |
||
29 | */ |
||
30 | protected $path; |
||
31 | |||
32 | /** |
||
33 | * @var string |
||
34 | */ |
||
35 | protected $method; |
||
36 | |||
37 | /** |
||
38 | * @var Parameter[] |
||
39 | */ |
||
40 | protected $parameters; |
||
41 | |||
42 | /** |
||
43 | * @var Schema |
||
44 | */ |
||
45 | protected $requestSchema; |
||
46 | |||
47 | /** |
||
48 | * @var Response[] |
||
49 | */ |
||
50 | protected $responses; |
||
51 | |||
52 | /** |
||
53 | * @var array |
||
54 | */ |
||
55 | private $extensions; |
||
56 | |||
57 | /** |
||
58 | * Operation constructor. |
||
59 | * |
||
60 | * @param string $id |
||
61 | * @param string $path |
||
62 | * @param string $method |
||
63 | * @param Parameter[] $parameters |
||
64 | * @param Schema $requestSchema |
||
65 | * @param Response[] $responses |
||
66 | * @param array $extensions |
||
67 | */ |
||
68 | public function __construct( |
||
85 | |||
86 | /** |
||
87 | * @param string $name |
||
88 | * |
||
89 | * @return mixed |
||
90 | */ |
||
91 | public function getExtension(string $name) |
||
95 | |||
96 | /** |
||
97 | * @return string |
||
98 | */ |
||
99 | public function getPath(): string |
||
103 | |||
104 | /** |
||
105 | * @return string |
||
106 | */ |
||
107 | public function getId(): string |
||
111 | |||
112 | /** |
||
113 | * @return int[] |
||
114 | */ |
||
115 | public function getStatusCodes(): array |
||
119 | |||
120 | /** |
||
121 | * @param int $code |
||
122 | * |
||
123 | * @return Response |
||
124 | */ |
||
125 | public function getResponse(int $code): Response |
||
140 | |||
141 | /** |
||
142 | * @return Response[] |
||
143 | */ |
||
144 | public function getResponses() |
||
148 | |||
149 | /** |
||
150 | * @return Schema |
||
151 | */ |
||
152 | public function getRequestSchema(): Schema |
||
156 | |||
157 | /** |
||
158 | * @return bool |
||
159 | */ |
||
160 | public function hasParameters(): bool |
||
164 | |||
165 | /** |
||
166 | * @return Parameter[] |
||
167 | */ |
||
168 | public function getParameters(): array |
||
172 | |||
173 | /** |
||
174 | * @param string $name |
||
175 | * |
||
176 | * @return Parameter |
||
177 | */ |
||
178 | public function getParameter(string $name): Parameter |
||
187 | |||
188 | /** |
||
189 | * @return string |
||
190 | */ |
||
191 | public function getMethod(): string |
||
195 | } |
||
196 |