The following global functions are available with the Environment package.
Using these functions will require the
Titon\Environment\Detector class to be registered in a Titon\Context\Depository instance.
Returns a variable value defined by key. Learn more about environment variables.
$key = env('API_KEY');Verify which environment is detected by matching against the APP_ENV variable. Learn more about environment detection.
is_env('local'); // trueReturns the Titon\Environment\Detector instance found in the Titon\Context\Depository container. If no instance exists, it will attempt to make one.