Pionia Core

EnvResolver
in package
Uses PathsTrait

Table of Contents

Properties

$dotenv  : Dotenv
$allFiles  : Arrayable|null
All files in the environment directory
$env  : Arrayable
Resolved environment variables
$path  : mixed|string
The path to the environment directory

Methods

__construct()  : mixed
all()  : Arrayable
Scan the environment directory and list all the files discovered grouped by type
appRoot()  : string
The root folder of the application.
envPath()  : string
getDirFor()  : string|null
Get the directory for a given alias
getEnv()  : Arrayable
Get the environment variables
getEnvFilePath()  : string
Get the environment file path
getEnvKeys()  : mixed
mediaPath()  : string
The path to the resources directory.
phpPath()  : string
phpVersion()  : string
publicPath()  : string
The directory where the frontend assets are stored.
resolve()  : void
Load the environment variables
resolveDatabaseConfigs()  : void
resolveDotEnv()  : void
Resolve the .env files in our environment We let dotenv handle this
resolveIniFiles()  : void
Resolve the ini files in our environment If we find a database configuration file, we shall mark it as the database configuration file
resolvePhpFiles()  : void
extractFromIniFile()  : void

Properties

$path

The path to the environment directory

private mixed|string $path

Methods

__construct()

public __construct([string|null $path = 'Environment' ]) : mixed
Parameters
$path : string|null = 'Environment'

all()

Scan the environment directory and list all the files discovered grouped by type

public all([string|null $path = null ]) : Arrayable
Parameters
$path : string|null = null
Return values
Arrayable

appRoot()

The root folder of the application.

public appRoot([string|null $path = null ][, int $levels = 3 ]) : string
Parameters
$path : string|null = null
$levels : int = 3
Return values
string

envPath()

public envPath([string|null $path = null ]) : string
Parameters
$path : string|null = null
Return values
string

getDirFor()

Get the directory for a given alias

public getDirFor(string $aliasName) : string|null
Parameters
$aliasName : string
Return values
string|null

getEnvFilePath()

Get the environment file path

public getEnvFilePath() : string
Return values
string

mediaPath()

The path to the resources directory.

public mediaPath() : string
Return values
string

phpPath()

public phpPath() : string
Return values
string

phpVersion()

public phpVersion() : string
Return values
string

publicPath()

The directory where the frontend assets are stored.

public publicPath([ $path = null ]) : string
Parameters
$path : = null
Return values
string

resolve()

Load the environment variables

public resolve() : void

resolveDatabaseConfigs()

public resolveDatabaseConfigs(Filesystem $fs[, string|null $fileName = 'database.ini' ]) : void
Parameters
$fs : Filesystem
$fileName : string|null = 'database.ini'

resolveDotEnv()

Resolve the .env files in our environment We let dotenv handle this

public resolveDotEnv() : void

resolveIniFiles()

Resolve the ini files in our environment If we find a database configuration file, we shall mark it as the database configuration file

public resolveIniFiles() : void

extractFromIniFile()

private extractFromIniFile(mixed $path) : void
Parameters
$path : mixed

        
On this page

Search results