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