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.

53 lines
1.3KB

  1. <?php
  2. namespace common\logic\Setting;
  3. use common\logic\AbstractModule;
  4. use common\logic\Setting\SettingDetails\Admin\AdminSettingDefinition;
  5. use common\logic\Setting\SettingDetails\Producer\ProducerSettingDefinition;
  6. class SettingModule extends AbstractModule
  7. {
  8. public function getServices(): array
  9. {
  10. return [
  11. SettingDefinition::class,
  12. AdminSettingDefinition::class,
  13. ProducerSettingDefinition::class,
  14. SettingRepository::class,
  15. SettingBuilder::class,
  16. SettingImporter::class,
  17. AdminSettingBag::class
  18. ];
  19. }
  20. public function getDefinition(): SettingDefinition
  21. {
  22. return SettingDefinition::getInstance();
  23. }
  24. public function getAdminSettingDefinition(): AdminSettingDefinition
  25. {
  26. return AdminSettingDefinition::getInstance();
  27. }
  28. public function getProducerSettingDefinition(): ProducerSettingDefinition
  29. {
  30. return ProducerSettingDefinition::getInstance();
  31. }
  32. public function getRepository(): SettingRepository
  33. {
  34. return SettingRepository::getInstance();
  35. }
  36. public function getImporter(): SettingImporter
  37. {
  38. return SettingImporter::getInstance();
  39. }
  40. public function getAdminSettingBag(): AdminSettingBag
  41. {
  42. return AdminSettingBag::getInstance();
  43. }
  44. }