class EnvironmentFile

Methods

__construct(Filesystem $filesystem)

Create a new environment file resolver.

string|null
package(string $workingPath, string $filename = '.env')

Resolve the package or workbench environment file.

string|null
packageOrSkeletonFallback(string $workingPath, string $appBasePath, string $filename = '.env')

Resolve the package or workbench environment file, falling back to the skeleton example.

string
sourcePath(string $workingPath)

Resolve the source path for testbench config and workbench fixtures.

string|null
firstExisting(string $path, array $candidates)

Resolve the first existing file from the ordered candidate list.

array
candidateNames(string $filename)

Get the ordered environment file candidate names.

string|null
skeletonFallback(string $appBasePath)

Resolve the skeleton environment fallback.

Details

at line 17
__construct(Filesystem $filesystem)

Create a new environment file resolver.

Parameters

Filesystem $filesystem

at line 25
string|null package(string $workingPath, string $filename = '.env')

Resolve the package or workbench environment file.

Parameters

string $workingPath
string $filename

Return Value

string|null

at line 38
string|null packageOrSkeletonFallback(string $workingPath, string $appBasePath, string $filename = '.env')

Resolve the package or workbench environment file, falling back to the skeleton example.

Parameters

string $workingPath
string $appBasePath
string $filename

Return Value

string|null

at line 47
string sourcePath(string $workingPath)

Resolve the source path for testbench config and workbench fixtures.

Parameters

string $workingPath

Return Value

string

at line 67
protected string|null firstExisting(string $path, array $candidates)

Resolve the first existing file from the ordered candidate list.

Parameters

string $path
array $candidates

Return Value

string|null

at line 85
protected array candidateNames(string $filename)

Get the ordered environment file candidate names.

Parameters

string $filename

Return Value

array

at line 100
protected string|null skeletonFallback(string $appBasePath)

Resolve the skeleton environment fallback.

Parameters

string $appBasePath

Return Value

string|null