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.

75 line
2.1KB

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