EnvironmentBypass
class EnvironmentBypass implements Bypass (View source)
Allows a bypass for a list of environment types (e.g. DEV, TEST, LIVE)
Methods
public
__construct(string[] ...$environments)
Initialize the bypass with the list of environment types
public
bool
checkRequestForBypass(HTTPRequest $request)
Checks whether the current environment type in the list of allowed ones
Details
__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