const mixinafIocEnv::IocEnv

afIocEnv::IocEnv

(Service) - Holds the environment with some hand utility methods.

abbr

Source

abstract Str abbr()

Returns the environment in abbreviated form; dev, test, prod. Or just the env in lowercase if not recognised.

env

Source

abstract Str env()

Returns the environment Str.

fromStr

Source

const static IocEnv fromStr(Str environment)

Create an IocEnv with the given environment.

isDev

Source

abstract Bool isDev()

Returns true if the environment is dev or development.

isEnv

Source

abstract Bool isEnv(Str env)

Returns true if the environment matches the given env in a case insensitive match.

isProd

Source

abstract Bool isProd()

Returns true if the environment is prod, production or undefined.

isTest

Source

abstract Bool isTest()

Returns true if the environment is test or testing.

logToInfo

Source

abstract Void logToInfo()

Logs environment to info.