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.

94 lines
2.5KB

  1. <?php
  2. namespace Lc\CaracoleBundle\Container\Order;
  3. use App\Entity\Order\OrderShop;
  4. use App\Resolver\OrderShopResolver;
  5. use Lc\CaracoleBundle\Builder\Order\OrderShopBuilder;
  6. use Lc\CaracoleBundle\Definition\Field\Order\OrderShopFieldDefinition;
  7. use Lc\CaracoleBundle\Factory\Order\OrderShopFactory;
  8. use Lc\CaracoleBundle\Repository\Order\OrderShopRepositoryQuery;
  9. use Lc\CaracoleBundle\Repository\Order\OrderShopStore;
  10. use Lc\CaracoleBundle\Solver\Order\OrderShopSolver;
  11. use Lc\CaracoleBundle\Transformer\Order\OrderShopTransformer;
  12. class OrderShopContainer
  13. {
  14. protected OrderShopFactory $factory;
  15. protected OrderShopSolver $solver;
  16. protected OrderShopRepositoryQuery $repositoryQuery;
  17. protected OrderShopStore $store;
  18. protected OrderShopBuilder $builder;
  19. protected OrderShopResolver $resolver;
  20. protected OrderShopTransformer $transformer;
  21. protected OrderShopFieldDefinition $fieldDefinition;
  22. public function __construct(
  23. OrderShopFactory $factory,
  24. OrderShopSolver $solver,
  25. OrderShopRepositoryQuery $repositoryQuery,
  26. OrderShopStore $store,
  27. OrderShopResolver $resolver,
  28. OrderShopBuilder $builder,
  29. OrderShopTransformer $transformer,
  30. OrderShopFieldDefinition $fieldDefinition
  31. ) {
  32. $this->factory = $factory;
  33. $this->solver = $solver;
  34. $this->repositoryQuery = $repositoryQuery;
  35. $this->store = $store;
  36. $this->resolver = $resolver;
  37. $this->builder = $builder;
  38. $this->transformer = $transformer;
  39. $this->fieldDefinition = $fieldDefinition;
  40. }
  41. public static function getEntityFqcn()
  42. {
  43. return OrderShop::class;
  44. }
  45. public function getFactory(): OrderShopFactory
  46. {
  47. return $this->factory;
  48. }
  49. public function getSolver(): OrderShopSolver
  50. {
  51. return $this->solver;
  52. }
  53. public function getRepositoryQuery(): OrderShopRepositoryQuery
  54. {
  55. return $this->repositoryQuery;
  56. }
  57. public function getStore(): OrderShopStore
  58. {
  59. $this->store->resetContext();
  60. return $this->store;
  61. }
  62. public function getResolver(): OrderShopResolver
  63. {
  64. return $this->resolver;
  65. }
  66. public function getBuilder(): OrderShopBuilder
  67. {
  68. return $this->builder;
  69. }
  70. public function getTransformer(): OrderShopTransformer
  71. {
  72. return $this->transformer;
  73. }
  74. public function getFieldDefinition(): OrderShopFieldDefinition
  75. {
  76. return $this->fieldDefinition;
  77. }
  78. }