You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.3KB

  1. <?php
  2. namespace Lc\CaracoleBundle\Container\File;
  3. use Lc\CaracoleBundle\Factory\File\DocumentFactory;
  4. use Lc\CaracoleBundle\Generator\DocumentReferenceGenerator;
  5. use Lc\CaracoleBundle\Repository\File\DocumentRepositoryQuery;
  6. use Lc\CaracoleBundle\Repository\File\DocumentStore;
  7. class DocumentContainer
  8. {
  9. protected DocumentFactory $factory;
  10. protected DocumentRepositoryQuery $repositoryQuery;
  11. protected DocumentStore $store;
  12. protected DocumentReferenceGenerator $referenceGenerator;
  13. public function __construct(
  14. DocumentFactory $factory,
  15. DocumentRepositoryQuery $repositoryQuery,
  16. DocumentStore $store,
  17. DocumentReferenceGenerator $referenceGenerator
  18. ) {
  19. $this->factory = $factory;
  20. $this->repositoryQuery = $repositoryQuery;
  21. $this->store = $store;
  22. $this->referenceGenerator = $referenceGenerator;
  23. }
  24. public function getFactory(): DocumentFactory
  25. {
  26. return $this->factory;
  27. }
  28. public function getRepositoryQuery(): DocumentRepositoryQuery
  29. {
  30. return $this->repositoryQuery;
  31. }
  32. public function getStore(): DocumentStore
  33. {
  34. $this->store->resetContext();
  35. return $this->store;
  36. }
  37. public function getReferenceGenerator(): DocumentReferenceGenerator
  38. {
  39. return $this->referenceGenerator;
  40. }
  41. }