const mixinafIocEnv::IocEnv
afIocEnv::IocEnv
(Service) - Holds the environment
with some hand utility methods.
- abbr
abstract Str abbr()
Returns the environment in abbreviated form;
dev, test, prod
. Or just the env in lowercase if not recognised.- env
abstract Str env()
Returns the environment Str.
- fromStr
static IocEnv fromStr(Str environment)
Create an
IocEnv
with the given environment.- isDev
abstract Bool isDev()
Returns
true
if the environment isdev
ordevelopment
.- isEnv
Returns
true
if the environment matches the givenenv
in a case insensitive match.- isProd
abstract Bool isProd()
Returns
true
if the environment isprod
,production
or undefined.- isTest
abstract Bool isTest()
Returns
true
if the environment istest
ortesting
.- logToInfo
abstract Void logToInfo()
Logs environment to info.