2020-08-04 11:25:22 +00:00
|
|
|
<?php
|
|
|
|
|
2021-06-08 09:52:11 +00:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
2020-08-04 11:25:22 +00:00
|
|
|
namespace Config;
|
2020-05-27 18:46:16 +02:00
|
|
|
|
2021-04-02 17:20:02 +00:00
|
|
|
use CodeIgniter\Modules\Modules as BaseModules;
|
|
|
|
|
2023-09-09 10:52:01 +00:00
|
|
|
/**
|
|
|
|
* Modules Configuration.
|
|
|
|
*
|
|
|
|
* NOTE: This class is required prior to Autoloader instantiation,
|
|
|
|
* and does not extend BaseConfig.
|
|
|
|
*
|
|
|
|
* @immutable
|
|
|
|
*/
|
2021-04-02 17:20:02 +00:00
|
|
|
class Modules extends BaseModules
|
2020-05-27 18:46:16 +02:00
|
|
|
{
|
2021-04-02 17:20:02 +00:00
|
|
|
/**
|
|
|
|
* --------------------------------------------------------------------------
|
|
|
|
* Enable Auto-Discovery?
|
|
|
|
* --------------------------------------------------------------------------
|
|
|
|
*
|
|
|
|
* If true, then auto-discovery will happen across all elements listed in
|
2021-05-25 10:40:22 +00:00
|
|
|
* $aliases below. If false, no auto-discovery will happen at all,
|
2021-04-02 17:20:02 +00:00
|
|
|
* giving a slight performance boost.
|
|
|
|
*
|
|
|
|
* @var boolean
|
2020-08-04 11:25:22 +00:00
|
|
|
*/
|
2020-06-10 15:00:12 +00:00
|
|
|
public $enabled = true;
|
2020-05-27 18:46:16 +02:00
|
|
|
|
2021-04-02 17:20:02 +00:00
|
|
|
/**
|
|
|
|
* --------------------------------------------------------------------------
|
|
|
|
* Enable Auto-Discovery Within Composer Packages?
|
|
|
|
* --------------------------------------------------------------------------
|
|
|
|
*
|
|
|
|
* If true, then auto-discovery will happen across all namespaces loaded
|
|
|
|
* by Composer, as well as the namespaces configured locally.
|
|
|
|
*
|
|
|
|
* @var boolean
|
2020-08-04 11:25:22 +00:00
|
|
|
*/
|
2020-06-10 15:00:12 +00:00
|
|
|
public $discoverInComposer = true;
|
2020-05-27 18:46:16 +02:00
|
|
|
|
2023-07-06 15:56:05 +00:00
|
|
|
/**
|
|
|
|
* The Composer package list for Auto-Discovery
|
|
|
|
* This setting is optional.
|
|
|
|
*
|
|
|
|
* E.g.:
|
|
|
|
* [
|
|
|
|
* 'only' => [
|
|
|
|
* // List up all packages to auto-discover
|
|
|
|
* 'codeigniter4/shield',
|
|
|
|
* ],
|
|
|
|
* ]
|
|
|
|
* or
|
|
|
|
* [
|
|
|
|
* 'exclude' => [
|
|
|
|
* // List up packages to exclude.
|
|
|
|
* 'pestphp/pest',
|
|
|
|
* ],
|
|
|
|
* ]
|
|
|
|
*
|
2024-01-01 22:54:59 +00:00
|
|
|
* @var array{only?: list<string>, exclude?: list<string>}
|
2023-07-06 15:56:05 +00:00
|
|
|
*/
|
|
|
|
public $composerPackages = [];
|
|
|
|
|
2020-06-10 15:00:12 +00:00
|
|
|
/**
|
2021-04-02 17:20:02 +00:00
|
|
|
* --------------------------------------------------------------------------
|
|
|
|
* Auto-Discovery Rules
|
|
|
|
* --------------------------------------------------------------------------
|
2020-06-10 15:00:12 +00:00
|
|
|
*
|
2021-04-02 17:20:02 +00:00
|
|
|
* Aliases list of all discovery classes that will be active and used during
|
|
|
|
* the current application request.
|
2020-06-10 15:00:12 +00:00
|
|
|
*
|
2021-04-02 17:20:02 +00:00
|
|
|
* If it is not listed, only the base application elements will be used.
|
2020-06-10 15:00:12 +00:00
|
|
|
*
|
2024-01-01 22:54:59 +00:00
|
|
|
* @var list<string>
|
2020-06-10 15:00:12 +00:00
|
|
|
*/
|
2021-04-02 17:20:02 +00:00
|
|
|
public $aliases = ['events', 'filters', 'registrars', 'routes', 'services'];
|
2020-05-27 18:46:16 +02:00
|
|
|
}
|