選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

ReductionCartContainer.php 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. namespace Lc\CaracoleBundle\Container\Reduction;
  3. use Lc\CaracoleBundle\Definition\Field\Reduction\ReductionCartFieldDefinition;
  4. use Lc\CaracoleBundle\Factory\Reduction\ReductionCartFactory;
  5. use Lc\CaracoleBundle\Repository\Reduction\ReductionCartRepositoryQuery;
  6. use Lc\CaracoleBundle\Repository\Reduction\ReductionCartStore;
  7. class ReductionCartContainer
  8. {
  9. protected ReductionCartFactory $factory;
  10. protected ReductionCartRepositoryQuery $repositoryQuery;
  11. protected ReductionCartStore $store;
  12. protected ReductionCartFieldDefinition $fieldDefinition;
  13. public function __construct(
  14. ReductionCartFactory $factory,
  15. ReductionCartRepositoryQuery $repositoryQuery,
  16. ReductionCartStore $store,
  17. ReductionCartFieldDefinition $fieldDefinition
  18. ) {
  19. $this->factory = $factory;
  20. $this->repositoryQuery = $repositoryQuery;
  21. $this->store = $store;
  22. $this->fieldDefinition = $fieldDefinition;
  23. }
  24. public function getFactory(): ReductionCartFactory
  25. {
  26. return $this->factory;
  27. }
  28. public function getRepositoryQuery(): ReductionCartRepositoryQuery
  29. {
  30. return $this->repositoryQuery;
  31. }
  32. public function getStore(): ReductionCartStore
  33. {
  34. $this->store->resetContext();
  35. return $this->store;
  36. }
  37. public function getFieldDefinition(): ReductionCartFieldDefinition
  38. {
  39. return $this->fieldDefinition;
  40. }
  41. }