1 | <?php declare(strict_types = 1); |
||
17 | class Operation implements Element |
||
18 | { |
||
19 | use VisiteeMixin; |
||
20 | |||
21 | /** |
||
22 | * @var string |
||
23 | */ |
||
24 | protected $path; |
||
25 | |||
26 | /** |
||
27 | * @var string |
||
28 | */ |
||
29 | protected $method; |
||
30 | |||
31 | /** |
||
32 | * @var Parameter[] |
||
33 | */ |
||
34 | protected $parameters; |
||
35 | |||
36 | /** |
||
37 | * @var Schema |
||
38 | */ |
||
39 | protected $requestSchema; |
||
40 | |||
41 | /** |
||
42 | * @var Response[] |
||
43 | */ |
||
44 | protected $responses; |
||
45 | |||
46 | /** |
||
47 | * Operation constructor. |
||
48 | * |
||
49 | * @param string $path |
||
50 | * @param string $method |
||
51 | * @param Parameter[] $parameters |
||
52 | * @param Schema $requestSchema |
||
53 | * @param Response[] $responses |
||
54 | */ |
||
55 | public function __construct( |
||
68 | |||
69 | /** |
||
70 | * @return string |
||
71 | */ |
||
72 | public function getPath(): string |
||
76 | |||
77 | /** |
||
78 | * @return string |
||
79 | */ |
||
80 | public function getId(): string |
||
84 | |||
85 | /** |
||
86 | * @return int[] |
||
87 | */ |
||
88 | public function getStatusCodes(): array |
||
92 | |||
93 | /** |
||
94 | * @param int $code |
||
95 | * |
||
96 | * @return Response |
||
97 | */ |
||
98 | public function getResponse(int $code): Response |
||
113 | |||
114 | /** |
||
115 | * @return Response[] |
||
116 | */ |
||
117 | public function getResponses() |
||
121 | |||
122 | /** |
||
123 | * @return Schema |
||
124 | */ |
||
125 | public function getRequestSchema(): Schema |
||
129 | |||
130 | /** |
||
131 | * @return bool |
||
132 | */ |
||
133 | public function hasParameters(): bool |
||
137 | |||
138 | /** |
||
139 | * @return Parameter[] |
||
140 | */ |
||
141 | public function getParameters(): array |
||
145 | |||
146 | /** |
||
147 | * @param string $name |
||
148 | * |
||
149 | * @return Parameter |
||
150 | */ |
||
151 | public function getParameter(string $name): Parameter |
||
160 | |||
161 | /** |
||
162 | * @return string |
||
163 | */ |
||
164 | public function getMethod(): string |
||
168 | } |
||
169 |