final class AppConfig (View source)

Carries application-wide runtime values resolved from host configuration and bootstrap context.

Methods

__construct(string|null $timezone, string|null $baseUrl, string $basePath, string $publicPath, string $env, bool $debug, string $appPath, string $configPath, string $storagePath, string|null $secret = null)

Captures immutable host configuration consumed by framework capabilities.

string|null

Returns the configured timezone identifier or null to use the runtime default.

string|null
string|null

Returns the explicit application base URL or null when it must be derived from the request.

string|null
string

Returns the absolute application root path established during bootstrap.

string
string

Returns the absolute path exposed by the web server.

string
string
env()

Returns the resolved application environment name.

string
bool
debug()

Reports whether framework debug behavior is enabled.

bool
string

Returns the absolute path containing application source code.

string
string

Returns the absolute path containing application configuration.

string
string

Returns the absolute path allocated to writable application data.

string
string|null
secret()

Returns the application secret or null when no secret was configured.

string|null

Details

__construct

__construct(string|null $timezone, string|null $baseUrl, string $basePath, string $publicPath, string $env, bool $debug, string $appPath, string $configPath, string $storagePath, string|null $secret = null)

Captures immutable host configuration consumed by framework capabilities.

Parameters

string|null $timezone
string|null $baseUrl
string $basePath
string $publicPath
string $env
bool $debug
string $appPath
string $configPath
string $storagePath
string|null $secret

Exceptions

InvalidArgumentException

timezone

string|null timezone()

Returns the configured timezone identifier or null to use the runtime default.

Return Value

string|null

baseUrl

string|null baseUrl()

Returns the explicit application base URL or null when it must be derived from the request.

Return Value

string|null

basePath

string basePath()

Returns the absolute application root path established during bootstrap.

Return Value

string

publicPath

string publicPath()

Returns the absolute path exposed by the web server.

Return Value

string

env

string env()

Returns the resolved application environment name.

Return Value

string

debug

bool debug()

Reports whether framework debug behavior is enabled.

Return Value

bool

appPath

string appPath()

Returns the absolute path containing application source code.

Return Value

string

configPath

string configPath()

Returns the absolute path containing application configuration.

Return Value

string

storagePath

string storagePath()

Returns the absolute path allocated to writable application data.

Return Value

string

secret

string|null secret()

Returns the application secret or null when no secret was configured.

Return Value

string|null