src/Entity/DataTransferObjects/DtoFactory.php
public function createEmptyDtoFromEntityFqn(string $entityFqn)
    {
        $dtoFqn = $this->namespaceHelper->getEntityDtoFqnFromEntityFqn($entityFqn);

        $dto = new $dtoFqn();
        $this->resetCreationTransaction();
        $this->createdDtos[$dtoFqn] = $dto;
        $this->setId($dto);
        $this->addRequiredItemsToDto($dto);
        $this->resetCreationTransaction();

        return $dto;
    }
public function createEmptyDtoFromEntityFqn(string $entityFqn)
    {
        $dtoFqn = $this->namespaceHelper->getEntityDtoFqnFromEntityFqn($entityFqn);

        $dto = new $dtoFqn();
        $this->resetCreationTransaction();
        $this->createdDtos[$dtoFqn] = $dto;
        $this->setId($dto);
        $this->addRequiredItemsToDto($dto);
        $this->resetCreationTransaction();

        return $dto;
    }
public function createEmptyDtoFromEntityFqn ( string $ entityFqn ) { $ dtoFqn = $ this -> namespaceHelper -> getEntityDtoFqnFromEntityFqn ( $ entityFqn ) ; $ dto = new $ dtoFqn ( ) ; $ this -> resetCreationTransaction ( ) ; $ this -> createdDtos [ $ dtoFqn ] = $ dto ; $ this -> setId ( $ dto ) ; $ this -> addRequiredItemsToDto ( $ dto ) ; $ this -> resetCreationTransaction ( ) ; return $ dto ; }
Pass in the FQN for an entity and get an empty DTO, including nested empty DTOs for required relations

@param string $entityFqn

@return mixed
Pass in the FQN for an entity and get an empty DTO including nested empty DTOs for required relations