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.

DistributionContainer.php 1.7KB

преди 3 години
преди 2 години
преди 3 години
преди 2 години
преди 3 години
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. }