Modules.php 2.2 KB

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