@@ 151-166 (lines=16) @@ | ||
148 | * |
|
149 | * @return array|null |
|
150 | */ |
|
151 | public function getHeaders() |
|
152 | { |
|
153 | if (!$this->annotations->exists(Header::NAME)) { |
|
154 | return null; |
|
155 | } |
|
156 | ||
157 | /** @var Header[] $headerAnnotations */ |
|
158 | $headerAnnotations = $this->annotations->get(Header::NAME); |
|
159 | ||
160 | $headers = []; |
|
161 | foreach ($headerAnnotations as $headerAnnotation) { |
|
162 | $headers[$headerAnnotation->getRequestKey()] = $headerAnnotation->getVariable(); |
|
163 | } |
|
164 | ||
165 | return $headers; |
|
166 | } |
|
167 | ||
168 | /** |
|
169 | * Get headers defined by "@Headers" |
|
@@ 290-305 (lines=16) @@ | ||
287 | * |
|
288 | * @return array|null |
|
289 | */ |
|
290 | public function getBodyParts() |
|
291 | { |
|
292 | if (!$this->annotations->exists(Part::NAME)) { |
|
293 | return null; |
|
294 | } |
|
295 | ||
296 | /** @var Part[] $partAnnotations */ |
|
297 | $partAnnotations = $this->annotations->get(Part::NAME); |
|
298 | ||
299 | $parts = []; |
|
300 | foreach ($partAnnotations as $partAnnotation) { |
|
301 | $parts[$partAnnotation->getRequestKey()] = $partAnnotation->getVariable(); |
|
302 | } |
|
303 | ||
304 | return $parts; |
|
305 | } |
|
306 | ||
307 | /** |
|
308 | * If the body parameter is an object |