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.

76 lines
2.0KB

  1. <?php
  2. namespace Lc\CaracoleBundle\Container\User;
  3. use App\Entity\User\UserMerchant;
  4. use Lc\CaracoleBundle\Builder\User\UserMerchantBuilder;
  5. use Lc\CaracoleBundle\Definition\Field\User\UserMerchantFieldDefinition;
  6. use Lc\CaracoleBundle\Factory\User\UserMerchantFactory;
  7. use Lc\CaracoleBundle\Repository\User\UserMerchantRepositoryQuery;
  8. use Lc\CaracoleBundle\Repository\User\UserMerchantStore;
  9. use Lc\CaracoleBundle\Solver\User\UserMerchantSolver;
  10. class UserMerchantContainer
  11. {
  12. protected UserMerchantFactory $factory;
  13. protected UserMerchantSolver $solver;
  14. protected UserMerchantRepositoryQuery $repositoryQuery;
  15. protected UserMerchantStore $store;
  16. protected UserMerchantBuilder $builder;
  17. protected UserMerchantFieldDefinition $fieldDefinition;
  18. public function __construct(
  19. UserMerchantFactory $factory,
  20. UserMerchantSolver $solver,
  21. UserMerchantRepositoryQuery $repositoryQuery,
  22. UserMerchantStore $store,
  23. UserMerchantBuilder $builder,
  24. UserMerchantFieldDefinition $fieldDefinition
  25. ) {
  26. $this->factory = $factory;
  27. $this->solver = $solver;
  28. $this->repositoryQuery = $repositoryQuery;
  29. $this->store = $store;
  30. $this->builder = $builder;
  31. $this->fieldDefinition = $fieldDefinition;
  32. }
  33. public static function getEntityFqcn()
  34. {
  35. return UserMerchant::class;
  36. }
  37. public function getFactory(): UserMerchantFactory
  38. {
  39. return $this->factory;
  40. }
  41. public function getSolver(): UserMerchantSolver
  42. {
  43. return $this->solver;
  44. }
  45. public function getRepositoryQuery(): UserMerchantRepositoryQuery
  46. {
  47. return $this->repositoryQuery;
  48. }
  49. public function getStore(): UserMerchantStore
  50. {
  51. $this->store->resetContext();
  52. return $this->store;
  53. }
  54. public function getBuilder(): UserMerchantBuilder
  55. {
  56. return $this->builder;
  57. }
  58. public function getFieldDefinition(): UserMerchantFieldDefinition
  59. {
  60. return $this->fieldDefinition;
  61. }
  62. }