private assocArrayToParameter ( array $struct ) : array | ||
$struct | array | The struct to map. |
return | array |
private function assocArrayToParameter(array $struct)
{
$types = [];
$values = [];
foreach ($struct as $name => $value) {
$param = $this->toParameter($value);
$types[] = ['name' => $name, 'type' => $param['parameterType']];
$values[$name] = $param['parameterValue'];
}
return [['type' => self::TYPE_STRUCT, 'structTypes' => $types], ['structValues' => $values]];
}