Modules.php 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <?php
  2. namespace Config;
  3. use CodeIgniter\Modules\Modules as BaseModules;
  4. /**
  5. * Modules Configuration.
  6. *
  7. * NOTE: This class is required prior to Autoloader instantiation,
  8. * and does not extend BaseConfig.
  9. *
  10. * @immutable
  11. */
  12. class Modules extends BaseModules
  13. {
  14. /**
  15. * --------------------------------------------------------------------------
  16. * Enable Auto-Discovery?
  17. * --------------------------------------------------------------------------
  18. *
  19. * If true, then auto-discovery will happen across all elements listed in
  20. * $aliases below. If false, no auto-discovery will happen at all,
  21. * giving a slight performance boost.
  22. *
  23. * @var bool
  24. */
  25. public $enabled = true;
  26. /**
  27. * --------------------------------------------------------------------------
  28. * Enable Auto-Discovery Within Composer Packages?
  29. * --------------------------------------------------------------------------
  30. *
  31. * If true, then auto-discovery will happen across all namespaces loaded
  32. * by Composer, as well as the namespaces configured locally.
  33. *
  34. * @var bool
  35. */
  36. public $discoverInComposer = true;
  37. /**
  38. * The Composer package list for Auto-Discovery
  39. * This setting is optional.
  40. *
  41. * E.g.:
  42. * [
  43. * 'only' => [
  44. * // List up all packages to auto-discover
  45. * 'codeigniter4/shield',
  46. * ],
  47. * ]
  48. * or
  49. * [
  50. * 'exclude' => [
  51. * // List up packages to exclude.
  52. * 'pestphp/pest',
  53. * ],
  54. * ]
  55. *
  56. * @var array
  57. */
  58. public $composerPackages = [];
  59. /**
  60. * --------------------------------------------------------------------------
  61. * Auto-Discovery Rules
  62. * --------------------------------------------------------------------------
  63. *
  64. * Aliases list of all discovery classes that will be active and used during
  65. * the current application request.
  66. *
  67. * If it is not listed, only the base application elements will be used.
  68. *
  69. * @var string[]
  70. */
  71. public $aliases = [
  72. 'events',
  73. 'filters',
  74. 'registrars',
  75. 'routes',
  76. 'services',
  77. ];
  78. }