Class EnvironmentDetector

Class EnvironmentDetector

This is a straight copy from Laravel.

Namespace: Concrete\Core\Foundation
Package: Concrete\Core\Foundation
Located at src/Foundation/EnvironmentDetector.php

Methods summary

public string
# detect( array|string $environments, array|null $consoleArgs = null )

Detect the application's current environment.

protected string
# detectWebEnvironment( array|string $environments )

Set the application environment for a web request.

protected string
# detectConsoleEnvironment( mixed $environments, array $args )

Set the application environment from command-line arguments.

protected string
# detectVariableEnvironment( mixed $environments )

Set the application environment from environment variable.

protected string|null
# getEnvironmentArgument( array $args )

Get the environment argument from the console.

protected string|boolean
# getEnvironmentFromVariable( )

Gets the environment from the CONCRETE5_ENV environment variable.

public boolean
# isMachine( string $name )

Determine if the name matches the machine name.