Feat: Implement contract generation and up-/downloading

This commit is contained in:
Björn Fromme
2023-10-11 17:47:06 +02:00
parent 7ecacd7c78
commit f0911f57aa
13 changed files with 421 additions and 10 deletions
+32
View File
@@ -0,0 +1,32 @@
<?php
namespace App\Service\Pdf;
use Psr\Cache\CacheItemPoolInterface;
use Symfony\Component\Cache\Adapter\ArrayAdapter;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Contracts\Translation\TranslatorInterface;
abstract class AbstractPdfRenderer
{
protected CacheItemPoolInterface|ArrayAdapter $cache;
protected int $B = 0;
protected int $I = 0;
protected int $U = 0;
protected array $config;
public function __construct(protected readonly TranslatorInterface $translator, array $options)
{
$optionsResolver = new OptionsResolver();
$optionsResolver
->setRequired('project_dir')
->setAllowedTypes('project_dir', 'string')
;
$this->config = $optionsResolver->resolve($options);
// Static cache without serialization
$this->cache = new ArrayAdapter(0, false);
}
}