PHP Class Webiny\Component\Config\Drivers\IniDriver

Inheritance: extends AbstractDriver
Show file Open project: Webiny/Framework Class Usage Examples

Public Methods

Method Description
setDelimiter ( string $delimiter ) Set delimiting character for nested properties, ex: a.b.c or a-b-c
useSections ( boolean $useSections ) Should parser use sections or not, ex: [section]

Protected Methods

Method Description
getArrayInternal ( ) : array Parse config resource and build config array
getStringInternal ( ) : string Get config data as string

Private Methods

Method Description
getIni ( $data )
getSection ( &$ini, $prefix )
parseIniString ( array $data ) : array Parse INI string and return config array
processValue ( string $section, string | array $value, array $config = [] ) : array Process given section and it's value Config array is empty by default, but it's a nested recursive call, it will be populated with data from previous calls
setValue ( $val )
validateSection ( StringObject $section )

Method Details

getArrayInternal() protected method

Parse config resource and build config array
protected getArrayInternal ( ) : array
return array

getStringInternal() protected method

Get config data as string
protected getStringInternal ( ) : string
return string

setDelimiter() public method

Set delimiting character for nested properties, ex: a.b.c or a-b-c
public setDelimiter ( string $delimiter )
$delimiter string Default: '.'

useSections() public method

Should parser use sections or not, ex: [section]
public useSections ( boolean $useSections )
$useSections boolean Default: true