Debian Codegraph @

lib/3rdParty/composer/aws/aws-sdk-php/src/Api/Serializer/Ec2ParamBuilder.php

raw symbols SCIP
1 <?php
2 namespace Aws\Api\Serializer;
3
4 use Aws\Api\Shape;
5 use Aws\Api\ListShape;
6
7 /**
8 * @internal
9 */
10 class Ec2ParamBuilder extends QueryParamBuilder
11 {
12 protected function queryName(Shape $shape, $default = null)
13 {
14 return ($shape['queryName']
15 ?: ucfirst(@$shape['locationName'] ?: ""))
16 ?: $default;
17 }
18
19 protected function isFlat(Shape $shape)
20 {
21 return false;
22 }
23
24 protected function format_list(
25 ListShape $shape,
26 array $value,
27 $prefix,
28 &$query
29 ) {
30 // Handle empty list serialization
31 if (!empty($value)) {
32 $items = $shape->getMember();
33 foreach ($value as $k => $v) {
34 $this->format($items, $v, $prefix . '.' . ($k + 1), $query);
35 }
36 }
37 }
38 }