EnvironmentManipulator.php
53 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * Matomo - free/libre analytics platform |
| 5 | * |
| 6 | * @link https://matomo.org |
| 7 | * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later |
| 8 | */ |
| 9 | namespace Piwik\Application; |
| 10 | |
| 11 | use Piwik\Application\Kernel\GlobalSettingsProvider; |
| 12 | use Piwik\Application\Kernel\PluginList; |
| 13 | /** |
| 14 | * Used to manipulate Environment instances before the container is created. |
| 15 | * Only used by the testing environment setup code, shouldn't be used anywhere |
| 16 | * else. |
| 17 | */ |
| 18 | interface EnvironmentManipulator |
| 19 | { |
| 20 | /** |
| 21 | * Create a custom GlobalSettingsProvider kernel object, overriding the default behavior. |
| 22 | * |
| 23 | * @return GlobalSettingsProvider |
| 24 | */ |
| 25 | public function makeGlobalSettingsProvider(GlobalSettingsProvider $original); |
| 26 | /** |
| 27 | * Create a custom PluginList kernel object, overriding the default behavior. |
| 28 | * |
| 29 | * @return PluginList |
| 30 | */ |
| 31 | public function makePluginList(GlobalSettingsProvider $globalSettingsProvider); |
| 32 | /** |
| 33 | * Invoked before the container is created. |
| 34 | */ |
| 35 | public function beforeContainerCreated(); |
| 36 | /** |
| 37 | * Return an array of definition arrays that override DI config specified in PHP config files. |
| 38 | * |
| 39 | * @return array[] |
| 40 | */ |
| 41 | public function getExtraDefinitions(); |
| 42 | /** |
| 43 | * Invoked after the container is created and the environment is considered bootstrapped. |
| 44 | */ |
| 45 | public function onEnvironmentBootstrapped(); |
| 46 | /** |
| 47 | * Return an array of environment names to apply after the normal environment. |
| 48 | * |
| 49 | * @return string[] |
| 50 | */ |
| 51 | public function getExtraEnvironments(); |
| 52 | } |
| 53 |