File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 55# zend-phpdotenv
66ZF2 Module that loads [ vlucas/phpdotenv] ( https://github.com/vlucas/phpdotenv ) .
77
8- Module attaches a listener to EVENT_MERGE_CONFIG on ModuleManager's EventManager, before the ConfigListener merges the config .
8+ Module attaches a listener to ` EVENT_LOAD_MODULE ` on ModuleManager's EventManager to load environment variables while the module is loaded .
99
1010# Installation
1111``` bash
@@ -14,8 +14,8 @@ composer require abacaphiliac/zend-phpdotenv
1414
1515# Usage
16161 . Add ` Abacaphiliac\ZendPhpDotEnv ` to your ZF2 application module config.
17- 1 . Create a ` .env ` file in the root directory of your ZF2 application.
18- 1 . Purge your ZF2 application's config cache (the environment variables will be added when the config is merged) .
17+ 2 . Create a ` .env ` file in the root directory of your ZF2 application.
18+ 3 . Use ` getenv() ` anywhere in your code (or config) to pull environment variables .
1919
2020# Dependencies
2121php >=5.3.9 and ZF >=2.3
You can’t perform that action at this time.
0 commit comments