ProcessenvOptions
in package
Table of Contents
Constants
- PARSE_AS_ARRAY = 1
- if this option is set, objects in the .env file will be converted into an array.
- PARSE_AS_STDCLASS = 0
- if this option is set, objects in the .env file will be converted to a StdClass.
Properties
- $exceptions : bool
- $globalEnv : bool
- $globalKey : bool
- $globalServer : bool
- $localFirst : bool
- $objectParser : string
- $replacePattern : string
Methods
- __construct() : mixed
- Option for Processenv class There are also Pars options to configure the parser for Object and masked hashtags (\\#)
- getObjectParser() : bool
- get objectParser option
- getReplacePattern() : string
- get replacePattern option
- isExceptions() : bool
- get exceptions option
- isGlobalEnv() : bool
- get glovalEnv option
- isGlobalKey() : bool
- get globalKey
- isGlobalServer() : bool
- get globalServer option
- isLocalFirst() : bool
- get local first option
Constants
PARSE_AS_ARRAY
if this option is set, objects in the .env file will be converted into an array.
public
mixed
PARSE_AS_ARRAY
= 1
PARSE_AS_STDCLASS
if this option is set, objects in the .env file will be converted to a StdClass.
public
mixed
PARSE_AS_STDCLASS
= 0
Properties
$exceptions
private
bool
$exceptions
= true
$globalEnv
private
bool
$globalEnv
= false
$globalKey
private
bool
$globalKey
= false
$globalServer
private
bool
$globalServer
= false
$localFirst
private
bool
$localFirst
= true
$objectParser
private
string
$objectParser
= self::PARSE_AS_STDCLASS
$replacePattern
private
string
$replacePattern
= '[:PROCESSENV_REPLACE:]'
Methods
__construct()
Option for Processenv class There are also Pars options to configure the parser for Object and masked hashtags (\\#)
public
__construct([bool $localFirst = true ][, bool $exceptions = true ][, bool $globalEnv = false ][, bool $globalServer = false ][, bool $globalKey = false ][, string $objectParser = self::PARSE_AS_STDCLASS ][, string $replacePattern = '[:PROCESSENV_REPLACE:]' ]) : mixed
default
new ProcessenvOptions(
localFirst: true,
exceptions: true,
globalEnv: false,
globalServer: false,
globalKey: false,
objectParser: self::PARSE_AS_STDCLASS,
replacePattern: '[:PROCESSENV_REPLACE:]'
);
Parameters
- $localFirst : bool = true
- $exceptions : bool = true
- $globalEnv : bool = false
- $globalServer : bool = false
- $globalKey : bool = false
- $objectParser : string = self::PARSE_AS_STDCLASS
- $replacePattern : string = '[:PROCESSENV_REPLACE:]'
getObjectParser()
get objectParser option
public
getObjectParser() : bool
Return values
boolgetReplacePattern()
get replacePattern option
public
getReplacePattern() : string
Return values
stringisExceptions()
get exceptions option
public
isExceptions() : bool
Return values
boolisGlobalEnv()
get glovalEnv option
public
isGlobalEnv() : bool
Return values
boolisGlobalKey()
get globalKey
public
isGlobalKey() : bool
Return values
boolisGlobalServer()
get globalServer option
public
isGlobalServer() : bool
Return values
boolisLocalFirst()
get local first option
public
isLocalFirst() : bool