PluginProbe
Media Cloud Sync / 1.2.6
Media Cloud Sync v1.2.6
1.4.1 1.4.0 1.3.12 1.3.11 1.3.10 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.2.0 1.2.10 1.2.11 1.2.12 1.2.13 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 All 35 releases
media-cloud-sync / includes / sdk / s3 / Aws / Api / Serializer / Ec2ParamBuilder.php

Ec2ParamBuilder.php in Media Cloud Sync 1.2.6, at includes/sdk/s3/Aws/Api/Serializer/Ec2ParamBuilder.php

33 lines 862 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Dudlewebs\WPMCS\s3\Aws\Api\Serializer;
4
5 use Dudlewebs\WPMCS\s3\Aws\Api\Shape;
6 use Dudlewebs\WPMCS\s3\Aws\Api\ListShape;
7 /**
8 * @internal
9 */
10 class Ec2ParamBuilder extends QueryParamBuilder
11 {
12 protected function queryName(Shape $shape, $default = null)
13 {
14 return ($shape['queryName'] ?: \ucfirst(@$shape['locationName'] ?: "")) ?: $default;
15 }
16 protected function isFlat(Shape $shape)
17 {
18 return \false;
19 }
20 protected function format_list(ListShape $shape, array $value, $prefix, &$query)
21 {
22 // Handle empty list serialization
23 if (!$value) {
24 $query[$prefix] = \false;
25 } else {
26 $items = $shape->getMember();
27 foreach ($value as $k => $v) {
28 $this->format($items, $v, $prefix . '.' . ($k + 1), $query);
29 }
30 }
31 }
32 }
33