Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

68 linhas
1.8KB

  1. <?php
  2. namespace Lc\CaracoleBundle\Container\Setting;
  3. use App\Entity\Setting\MerchantSetting;
  4. use Lc\CaracoleBundle\Definition\MerchantSettingDefinition;
  5. use Lc\CaracoleBundle\Factory\Setting\MerchantSettingFactory;
  6. use Lc\CaracoleBundle\Repository\Setting\MerchantSettingRepositoryQuery;
  7. use Lc\CaracoleBundle\Repository\Setting\MerchantSettingStore;
  8. use Lc\SovBundle\Solver\Setting\SettingSolver;
  9. class MerchantSettingContainer
  10. {
  11. protected MerchantSettingFactory $factory;
  12. protected MerchantSettingDefinition $definition;
  13. protected MerchantSettingRepositoryQuery $repositoryQuery;
  14. protected MerchantSettingStore $store;
  15. protected SettingSolver $settingSolver;
  16. public function __construct(
  17. MerchantSettingFactory $factory,
  18. MerchantSettingDefinition $definition,
  19. MerchantSettingRepositoryQuery $repositoryQuery,
  20. MerchantSettingStore $store,
  21. SettingSolver $settingSolver
  22. ) {
  23. $this->factory = $factory;
  24. $this->definition = $definition;
  25. $this->repositoryQuery = $repositoryQuery;
  26. $this->store = $store;
  27. $this->settingSolver = $settingSolver;
  28. }
  29. public static function getEntityFqcn()
  30. {
  31. return MerchantSetting::class;
  32. }
  33. public function getFactory(): MerchantSettingFactory
  34. {
  35. return $this->factory;
  36. }
  37. public function getDefinition(): MerchantSettingDefinition
  38. {
  39. return $this->definition;
  40. }
  41. public function getRepositoryQuery(): MerchantSettingRepositoryQuery
  42. {
  43. return $this->repositoryQuery;
  44. }
  45. public function getStore(): MerchantSettingStore
  46. {
  47. $this->store->resetContext();
  48. return $this->store;
  49. }
  50. public function getSettingSolver(): SettingSolver
  51. {
  52. return $this->settingSolver;
  53. }
  54. }