|
- <?php
-
- namespace Lc\CaracoleBundle\Container\File;
-
- use App\Entity\File\Document;
- use Lc\CaracoleBundle\Factory\File\DocumentFactory;
- use Lc\CaracoleBundle\Generator\DocumentReferenceGenerator;
- use Lc\CaracoleBundle\Repository\File\DocumentRepositoryQuery;
- use Lc\CaracoleBundle\Repository\File\DocumentStore;
-
- class DocumentContainer
- {
- protected DocumentFactory $factory;
- protected DocumentRepositoryQuery $repositoryQuery;
- protected DocumentStore $store;
- protected DocumentReferenceGenerator $referenceGenerator;
-
- public function __construct(
- DocumentFactory $factory,
- DocumentRepositoryQuery $repositoryQuery,
- DocumentStore $store,
- DocumentReferenceGenerator $referenceGenerator
- ) {
- $this->factory = $factory;
- $this->repositoryQuery = $repositoryQuery;
- $this->store = $store;
- $this->referenceGenerator = $referenceGenerator;
- }
-
- public static function getEntityFqcn()
- {
- return Document::class;
- }
-
- public function getFactory(): DocumentFactory
- {
- return $this->factory;
- }
-
- public function getRepositoryQuery(): DocumentRepositoryQuery
- {
- return $this->repositoryQuery;
- }
-
- public function getStore(): DocumentStore
- {
- $this->store->resetContext();
-
- return $this->store;
- }
-
- public function getReferenceGenerator(): DocumentReferenceGenerator
- {
- return $this->referenceGenerator;
- }
- }
|