abacaphiliac/zend-phpdotenv

ZF2 Module that loads vlucas/phpdotenv

0.2.2 2016-07-06 12:41 UTC

This package is auto-updated.

Last update: 2024-11-25 10:53:09 UTC


README

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.