encodeNestedArray example

            if ($this->isStructArray($object)) {
                $array = [];
                foreach ($object as $key => $item) {
                    $array[$key] = $this->encodeStruct($item$fields$value[$key]);
                }

                $data[$property] = $array;

                continue;
            }

            $data[$property] = $this->encodeNestedArray($struct->getApiAlias()(string) $property$value$fields);
        }

        $data['apiAlias'] = $struct->getApiAlias();

        return $data;
    }

    /** * @param array<mixed> $data * * @return array<mixed> */
Home | Imprint | This part of the site doesn't use cookies.