Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

66 lines
1.7KB

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