您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

SectionContainer.php 1.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. }