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.

AddressContainer.php 1.6KB

2 jaren geleden
3 jaren geleden
3 jaren geleden
3 jaren geleden
3 jaren geleden
3 jaren geleden
3 jaren geleden
3 jaren geleden
3 jaren geleden
2 jaren geleden
3 jaren geleden
3 jaren geleden
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?php
  2. namespace Lc\CaracoleBundle\Container\Address;
  3. use App\Entity\Address\Address;
  4. use Lc\CaracoleBundle\Builder\Address\AddressBuilder;
  5. use Lc\CaracoleBundle\Factory\Address\AddressFactory;
  6. use Lc\CaracoleBundle\Repository\Address\AddressRepositoryQuery;
  7. use Lc\CaracoleBundle\Repository\Address\AddressStore;
  8. use Lc\CaracoleBundle\Solver\Address\AddressSolver;
  9. class AddressContainer
  10. {
  11. protected AddressFactory $factory;
  12. protected AddressSolver $solver;
  13. protected AddressRepositoryQuery $repositoryQuery;
  14. protected AddressStore $store;
  15. protected AddressBuilder $builder;
  16. public function __construct(
  17. AddressFactory $factory,
  18. AddressSolver $solver,
  19. AddressRepositoryQuery $repositoryQuery,
  20. AddressStore $store,
  21. AddressBuilder $builder
  22. ) {
  23. $this->factory = $factory;
  24. $this->solver = $solver;
  25. $this->repositoryQuery = $repositoryQuery;
  26. $this->store = $store;
  27. $this->builder = $builder;
  28. }
  29. public static function getEntityFqcn()
  30. {
  31. return Address::class;
  32. }
  33. public function getFactory(): AddressFactory
  34. {
  35. return $this->factory;
  36. }
  37. public function getSolver(): AddressSolver
  38. {
  39. return $this->solver;
  40. }
  41. public function getRepositoryQuery(): AddressRepositoryQuery
  42. {
  43. return $this->repositoryQuery;
  44. }
  45. public function getStore(): AddressStore
  46. {
  47. $this->store->resetContext();
  48. return $this->store;
  49. }
  50. public function getBuilder(): AddressBuilder
  51. {
  52. return $this->builder;
  53. }
  54. }