Env A small PHP library to get environment details

Getting Started

Usage

Environment Variables

View the API Documentation for this class

Once you’ve defined the source of your environment variables there are simple methods to work with them:

# Retrieve a variable (or null if it doesn't exist)
$username = Env::getVar("git-username");
# Retrieve a variable (but throw an exception if it doesn't exist)
$shouldDeleteDirectories = Env::requireVar("delete-directories-mode");
# Override a variable (for the duration of this request only, does not persist)
Env::setVar("version", "DEV");