Skip to content

The Nuxed Environment component provides functions that help you manage environment variables.

License

Notifications You must be signed in to change notification settings

nuxed/environment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

2287ec0 · Oct 24, 2019

History

1 Commit
Oct 24, 2019
Oct 24, 2019
Oct 24, 2019
Oct 24, 2019
Oct 24, 2019
Oct 24, 2019
Oct 24, 2019
Oct 24, 2019
Oct 24, 2019
Oct 24, 2019
Oct 24, 2019
Oct 24, 2019
Oct 24, 2019

Repository files navigation

Build Status Total Downloads Latest Stable Version License

Nuxed Environment

Nuxed Environment provides functions that help you manage environment variables.

Installation

This package can be installed with Composer.

$ composer require nuxed/environment

Example

use namespace Nuxed\Environment;

<<__EntryPoint>>
async function main(): void {
  await Environment\load('.env');

  if(!Environment\contains('APP_MODE')) {
    Environment\put('APP_MODE', 'prod');
  }

  $mode = Environment\mode();
  switch($mode) {
    case Environment\Mode::Developement:
      // Dev
    case Environment\Mode::Production:
      // Prod
    case Environment\Mode::Test:
      // Test
  }
}

Security

For information on reporting security vulnerabilities in Nuxed Environment, see SECURITY.md.


License

The Nuxed Environment library is open-sourced software licensed under the MIT-licensed.