Skip to content

Latest commit

 

History

History
35 lines (26 loc) · 1.6 KB

README.md

File metadata and controls

35 lines (26 loc) · 1.6 KB

Scrutinizer Code Quality Code Coverage Build Status

zend-phpdotenv

ZF2 Module that loads vlucas/phpdotenv.

Module attaches a listener to EVENT_LOAD_MODULE on ModuleManager's EventManager to load environment variables while the module is loaded.

Installation

composer require abacaphiliac/zend-phpdotenv

Usage

  1. Add Abacaphiliac\ZendPhpDotEnv to your ZF2 application module config.
  2. Create a .env file in the root directory of your ZF2 application.
  3. Use getenv() anywhere in your code (or config) to pull environment variables.

Dependencies

php >=5.3.9 and ZF >=2

See composer.json.

Contributing

composer install && vendor/bin/phing

This library attempts to comply with PSR-1, PSR-2, and PSR-4. If you notice compliance oversights, please send a patch via pull request.