nod/nod-environment

A php library for detecting and configuring environment through dotenv

dev-master 2015-05-19 17:25 UTC

This package is not auto-updated.

Last update: 2024-11-09 18:27:20 UTC


README

A php library for detecting and configuring environment with dotenv

##Installation: #####With Composer:

composer require nod/environment

##Usage

//First include composer autoloader if it's not already included
$loader = require_once 'vendor/autoload.php';

//Get Instance
use NOD\Environment;
$env = new Nod\Environment;

//To test a value
echo $env->getEnv(name);
//or
echo getenv(name);

//EXCLUDE variables filtered JSON
echo $env->toJson();

##TODOs

  • Imrove documentation
  • Add optional hostname check to detection

##Contact: hey@nod.st