\CodeIgniter\ConfigBaseConfig

Class BaseConfig

Not intended to be used on its own, this class will attempt to automatically populate the child class' properties with values from the environment.

These can be set within the .env file.

Summary

Methods
Properties
Constants
__construct()
$registrars
No constants found
initEnvValue()
getEnvValue()
registerProperties()
$didDiscovery
$moduleConfig
N/A
No private methods found
No private properties found
N/A

Properties

$registrars

$registrars : array

An optional array of classes that will act as Registrars for rapidly setting config class properties.

Type

array

$didDiscovery

$didDiscovery : boolean

Has module discovery happened yet?

Type

boolean

$moduleConfig

$moduleConfig : \CodeIgniter\Config\type

The modules configuration.

Type

\CodeIgniter\Config\type

Methods

__construct()

__construct() 

Will attempt to get environment variables with names that match the properties of the child class.

The "shortPrefix" is the lowercase-only config class name.

initEnvValue()

initEnvValue(  $property, string  $name, string  $prefix, string  $shortPrefix) : mixed

Initialization an environment-specific configuration setting

Parameters

$property
string $name
string $prefix
string $shortPrefix

Returns

mixed

getEnvValue()

getEnvValue(string  $property, string  $prefix, string  $shortPrefix) : mixed

Retrieve an environment-specific configuration setting

Parameters

string $property
string $prefix
string $shortPrefix

Returns

mixed

registerProperties()

registerProperties() 

Provides external libraries a simple way to register one or more options into a config file.

Throws

\ReflectionException