EnvironmentDetector
in package
Table of Contents
- detect() : string
- Detect the application's current environment.
- detectConsoleEnvironment() : string
- Set the application environment from command-line arguments.
- detectWebEnvironment() : string
- Set the application environment for a web request.
- getEnvironmentArgument() : string|null
- Get the environment argument from the console.
Methods
detect()
Detect the application's current environment.
public
detect(Closure $callback[, array<string|int, mixed>|null $consoleArgs = null ]) : string
Parameters
- $callback : Closure
- $consoleArgs : array<string|int, mixed>|null = null
Return values
string —detectConsoleEnvironment()
Set the application environment from command-line arguments.
protected
detectConsoleEnvironment(Closure $callback, array<string|int, mixed> $args) : string
Parameters
- $callback : Closure
- $args : array<string|int, mixed>
Return values
string —detectWebEnvironment()
Set the application environment for a web request.
protected
detectWebEnvironment(Closure $callback) : string
Parameters
- $callback : Closure
Return values
string —getEnvironmentArgument()
Get the environment argument from the console.
protected
getEnvironmentArgument(array<string|int, mixed> $args) : string|null
Parameters
- $args : array<string|int, mixed>