Feature: [docgen][stored object] handler for request generator and required fixes

This commit is contained in:
2023-02-14 23:26:00 +01:00
parent 55918bcafb
commit 91d21ba939
18 changed files with 307 additions and 110 deletions

View File

@@ -0,0 +1,28 @@
<?php
namespace Chill\DocGeneratorBundle\Service\Generator;
use Chill\DocGeneratorBundle\Entity\DocGeneratorTemplate;
use Chill\DocStoreBundle\Entity\StoredObject;
use Symfony\Component\HttpFoundation\File\File;
interface GeneratorInterface
{
/**
* @template T of File|null
* @template B of bool
* @param B $isTest
* @param (B is true ? T : null) $testFile
* @psalm-return (B is true ? string : null)
* @throws \Symfony\Component\Serializer\Exception\ExceptionInterface|\Throwable
*/
public function generateDocFromTemplate(
DocGeneratorTemplate $template,
string $entityClassName,
int $entityId,
array $contextGenerationData,
?StoredObject $destinationStoredObject = null,
bool $isTest = false,
?File $testFile = null
): ?string;
}