Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

63 lines
1.5KB

  1. <?php
  2. namespace common\logic\Payment\Module;
  3. use common\logic\AbstractModule;
  4. use common\logic\Payment\Repository\PaymentRepository;
  5. use common\logic\Payment\Service\PaymentNotifier;
  6. use common\logic\Payment\Service\PaymentManager;
  7. use common\logic\Payment\Service\PaymentBuilder;
  8. use common\logic\Payment\Service\PaymentDefinition;
  9. use common\logic\Payment\Service\PaymentSolver;
  10. /**
  11. * @mixin PaymentDefinition
  12. * @mixin PaymentSolver
  13. * @mixin PaymentRepository
  14. * @mixin PaymentBuilder
  15. * @mixin PaymentManager
  16. */
  17. class PaymentModule extends AbstractModule
  18. {
  19. public function getServices(): array
  20. {
  21. return [
  22. PaymentDefinition::class,
  23. PaymentSolver::class,
  24. PaymentBuilder::class,
  25. PaymentRepository::class,
  26. PaymentNotifier::class,
  27. PaymentManager::class,
  28. ];
  29. }
  30. public function getDefinition(): PaymentDefinition
  31. {
  32. return PaymentDefinition::getInstance();
  33. }
  34. public function getSolver(): PaymentSolver
  35. {
  36. return PaymentSolver::getInstance();
  37. }
  38. public function getBuilder(): PaymentBuilder
  39. {
  40. return PaymentBuilder::getInstance();
  41. }
  42. public function getRepository(): PaymentRepository
  43. {
  44. return PaymentRepository::getInstance();
  45. }
  46. public function getNotifier(): PaymentNotifier
  47. {
  48. return PaymentNotifier::getInstance();
  49. }
  50. public function getManager(): PaymentManager
  51. {
  52. return PaymentManager::getInstance();
  53. }
  54. }