final public
|
#
__construct(
)
Static class – cannot be instantiated. Static class – cannot be instantiated. |
public static
void
|
#
setConfigurator(
Configurator
$configurator
)
Sets „class behind Environment“ configurator. Sets „class behind Environment“ configurator. Parameters$configurator Configurator |
public static
Configurator
|
#
getConfigurator(
)
Gets „class behind Environment“ configurator. Gets „class behind Environment“ configurator. |
public static
void
|
#
setName(
string
$name
)
Sets the current environment name. |
public static
string
|
#
getName(
)
Returns the current environment name. Returns the current environment name. |
public static
void
|
#
setMode(
string
$mode,
bool
$value = true
)
Sets the mode. Sets the mode. Parameters$mode string mode identifier$value bool set or unset |
public static
bool
|
#
getMode(
string
$mode
)
Returns the mode. Returns the mode. Parameters$mode string mode identifier |
public static
bool
|
#
isConsole(
)
Detects console (non-HTTP) mode. Detects console (non-HTTP) mode. |
public static
bool
|
#
isProduction(
)
Determines whether a server is running in production mode. Determines whether a server is running in production mode. |
public static
void
|
#
setVariable(
string
$name,
mixed
$value,
bool
$expand = true
)
Sets the environment variable. Sets the environment variable. Parameters$name string$value mixed$expand bool |
public static
mixed
|
#
getVariable(
string
$name,
mixed
$default = NULL
)
Returns the value of an environment variable or $default if there is no element set. Returns the value of an environment variable or $default if there is no element set. Parameters$name string$default mixed default value to use if key not foundThrows |
public static
array
|
#
getVariables(
)
Returns the all environment variables. Returns the all environment variables. |
public static
string
|
#
expand(
string
$var
)
Returns expanded variable. |
public static
IContext
|
#
getContext(
)
Get initial instance of context. Get initial instance of context. |
public static
object
|
#
getService(
string
$name,
array
$options = NULL
)
Gets the service object of the specified type. Gets the service object of the specified type. Parameters$name string service name$options array options in case service is not singleton |
public static
void
|
#
setServiceAlias(
string
$service,
string
$alias
)
Adds new Environment::get<Service>() method. Adds new Environment::get<Service>() method. Parameters$service string service name$alias string alias name |
public static
object
|
#
__callStatic(
string
$name,
array
$args
)
Calling to undefined static method. Calling to undefined static method. Parameters$name string method name$args array argumentsReturnsobject service
|
public static
Nette\Web\HttpRequest
|
#
getHttpRequest(
)
|
public static
Nette\Web\HttpContext
|
#
getHttpContext(
)
|
public static
Nette\Web\HttpResponse
|
#
getHttpResponse(
)
|
public static
Nette\Application\Application
|
#
getApplication(
)
|
public static
Nette\Web\User
|
#
getUser(
)
|
public static
Nette\Loaders\RobotLoader
|
#
getRobotLoader(
)
|
public static
Nette\Caching\Cache
|
#
getCache(
string
$namespace = ''
)
Parameters$namespace string |
public static
Nette\Web\Session
|
#
getSession(
string
$namespace = NULL
)
Returns instance of session or session namespace. Returns instance of session or session namespace. Parameters$namespace string |
public static
\ArrayObject
|
#
loadConfig(
string|Nette\Config\Config
$file = NULL
)
Loads global configuration from file and process it. Loads global configuration from file and process it. Parameters$file string|Nette\Config\Config file name or Config object |
public static
mixed
|
#
getConfig(
string
$key = NULL,
mixed
$default = NULL
)
Returns the global configuration. Returns the global configuration. Parameters$key string key$default mixed default value |