serializeEntity example


    public function toArray($entity)
    {
        if ($entity instanceof Traversable) {
            $entity = iterator_to_array($entity);
        }

        if (\is_array($entity)) {
            return array_map([$this, 'serializeEntity']$entity);
        }

        return $this->serializeEntity($entity);
    }

    /** * Returns the total count of the passed query builder. * * @param Query<ModelEntity|array<string, mixed>> $query * * @return int|null */
    public function getQueryCount(Query $query)
    {
        
 catch (\InvalidArgumentException) {
                continue;
            }

            if (!$relationData) {
                continue;
            }

            if ($relationData instanceof EntityCollection) {
                /** @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);
    }

    
Home | Imprint | This part of the site doesn't use cookies.