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

51 行
1.2KB

  1. <?php
  2. namespace Lc\CaracoleBundle\Container\Product;
  3. use Lc\CaracoleBundle\Factory\Product\ProductFactory;
  4. use Lc\CaracoleBundle\Repository\Product\ProductRepositoryQuery;
  5. use Lc\CaracoleBundle\Repository\Product\ProductStore;
  6. use Lc\CaracoleBundle\Solver\Product\ProductSolver;
  7. class ProductContainer
  8. {
  9. protected ProductFactory $factory;
  10. protected ProductSolver $solver;
  11. protected ProductRepositoryQuery $repositoryQuery;
  12. protected ProductStore $store;
  13. public function __construct(
  14. ProductFactory $factory,
  15. ProductSolver $solver,
  16. ProductRepositoryQuery $repositoryQuery,
  17. ProductStore $store
  18. ) {
  19. $this->factory = $factory;
  20. $this->solver = $solver;
  21. $this->repositoryQuery = $repositoryQuery;
  22. $this->store = $store;
  23. }
  24. public function getFactory(): ProductFactory
  25. {
  26. return $this->factory;
  27. }
  28. public function getSolver(): ProductSolver
  29. {
  30. return $this->solver;
  31. }
  32. public function getRepositoryQuery(): ProductRepositoryQuery
  33. {
  34. return $this->repositoryQuery;
  35. }
  36. public function getStore(): ProductStore
  37. {
  38. $this->store->resetContext();
  39. return $this->store;
  40. }
  41. }