class EnvironmentBypass implements Bypass

Allows a bypass for a list of environment types (e.g. DEV, TEST, LIVE)

Methods

__construct(string[] $environments)

Initialize the bypass with the list of environment types

string[]
getEnvironments()

Returns the list of environments

$this
setEnvironments(string[] $environments)

Set the list of environments allowing a bypass

bool
checkRequestForBypass(HTTPRequest $request)

Checks whether the current environment type in the list of allowed ones

Details

at line 27
__construct(string[] $environments)

Initialize the bypass with the list of environment types

Parameters

string[] $environments

at line 38
string[] getEnvironments()

Returns the list of environments

Return Value

string[]

at line 50
$this setEnvironments(string[] $environments)

Set the list of environments allowing a bypass

Parameters

string[] $environments List of environment types

Return Value

$this

at line 64
bool checkRequestForBypass(HTTPRequest $request)

Checks whether the current environment type in the list of allowed ones

Parameters

HTTPRequest $request

Return Value

bool True if we can bypass, False if the confirmation is required