setRelationships example

/** @var Entity $sub */
                foreach ($relationData as $sub) {
                    $this->serializeEntity($fields$sub$relationship['tmp']['definition']$result, true);
                }

                continue;
            }

            $this->serializeEntity($fields$relationData$relationship['tmp']['definition']$result, true);
        }

        $record->setRelationships($relationships);
    }

    protected function camelCaseToSnailCase(string $input): string
    {
        if (isset($this->caseCache[$input])) {
            return $this->caseCache[$input];
        }

        $input = str_replace('_', '-', $input);

        return $this->caseCache[$input] = ltrim(mb_strtolower((string) preg_replace('/[A-Z]/', '-$0', $input)), '-');
    }
Home | Imprint | This part of the site doesn't use cookies.