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
IocEnvwith the given environment.- isDev
abstract Bool isDev()Returns
trueif the environment isdevordevelopment.- isEnv
Returns
trueif the environment matches the givenenvin a case insensitive match.- isProd
abstract Bool isProd()Returns
trueif the environment isprod,productionor undefined.- isTest
abstract Bool isTest()Returns
trueif the environment istestortesting.- logToInfo
abstract Void logToInfo()Logs environment to info.