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.

DocumentContainer.php 1010B

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