src/Entity/DataTransferObjects/DtoFactory.php
private function addNestedDtoToCollection(
        DataTransferObjectInterface $dto,
        string $propertyName,
        string $entityInterfaceFqn
    ): void {
        $collectionGetter = 'get' . $propertyName;
        $dto->$collectionGetter()->add(
            $this->createDtoRelatedToDto(
                $dto,
                $this->namespaceHelper->getEntityFqnFromEntityInterfaceFqn($entityInterfaceFqn)
            )
        );
    }
private function addNestedDtoToCollection(
        DataTransferObjectInterface $dto,
        string $propertyName,
        string $entityInterfaceFqn
    ): void {
        $collectionGetter = 'get' . $propertyName;
        $dto->$collectionGetter()->add(
            $this->createDtoRelatedToDto(
                $dto,
                $this->namespaceHelper->getEntityFqnFromEntityInterfaceFqn($entityInterfaceFqn)
            )
        );
    }
private function addNestedDtoToCollection ( DataTransferObjectInterface $ dto , string $ propertyName , string $ entityInterfaceFqn ) : void { $ collectionGetter = 'get' . $ propertyName ; $ dto -> $ collectionGetter ( ) -> add ( $ this -> createDtoRelatedToDto ( $ dto , $ this -> namespaceHelper -> getEntityFqnFromEntityInterfaceFqn ( $ entityInterfaceFqn ) ) ) ; }
Create and add a related DTO into the owning DTO collection property

@param DataTransferObjectInterface $dto
@param string                      $propertyName
@param string                      $entityInterfaceFqn

@throws \EdmondsCommerce\DoctrineStaticMeta\Exception\DoctrineStaticMetaException
@throws \ReflectionException
Create and add a related DTO into the owning DTO collection property