選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

53 行
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. }