Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

67 lines
1.6KB

  1. <?php
  2. namespace Lc\CaracoleBundle\Container\Section;
  3. use App\Entity\Section\Section;
  4. use Lc\CaracoleBundle\Factory\Section\SectionFactory;
  5. use Lc\CaracoleBundle\Repository\Section\SectionRepositoryQuery;
  6. use Lc\CaracoleBundle\Repository\Section\SectionStore;
  7. use Lc\CaracoleBundle\Resolver\SectionResolver;
  8. use Lc\CaracoleBundle\Solver\Section\SectionSolver;
  9. class SectionContainer
  10. {
  11. protected SectionFactory $factory;
  12. protected SectionSolver $solver;
  13. protected SectionResolver $resolver;
  14. protected SectionRepositoryQuery $repositoryQuery;
  15. protected SectionStore $store;
  16. public function __construct(
  17. SectionFactory $factory,
  18. SectionSolver $solver,
  19. SectionResolver $resolver,
  20. SectionRepositoryQuery $repositoryQuery,
  21. SectionStore $store
  22. ) {
  23. $this->factory = $factory;
  24. $this->solver = $solver;
  25. $this->resolver = $resolver;
  26. $this->repositoryQuery = $repositoryQuery;
  27. $this->store = $store;
  28. }
  29. public static function getEntityFqcn()
  30. {
  31. return Section::class;
  32. }
  33. public function getFactory(): SectionFactory
  34. {
  35. return $this->factory;
  36. }
  37. public function getSolver(): SectionSolver
  38. {
  39. return $this->solver;
  40. }
  41. public function getResolver(): SectionResolver
  42. {
  43. return $this->resolver;
  44. }
  45. public function getRepositoryQuery(): SectionRepositoryQuery
  46. {
  47. return $this->repositoryQuery;
  48. }
  49. public function getStore(): SectionStore
  50. {
  51. $this->store->resetContext();
  52. return $this->store;
  53. }
  54. }