public function loadFromIni(string $iniPath, bool $overwrite = false): void
    {
        if (!file_exists($iniPath)) {
            return;
        }
        
        $iniArr = null;
        try {
            $iniArr = parse_ini_file($iniPath, false, INI_SCANNER_TYPED);
        } catch (\Throwable $e) {
        }
        if (!is_array($iniArr)) {
            return;
        }
        $iniArr = array_change_key_case($iniArr, CASE_LOWER);
        
        $arr = [];
        foreach ($iniArr as $name => $value) {
            $arr[lcfirst(str_replace('_', '', ucwords(str_replace('.', '_', $name), '_')))] = $value;
        }
        
        $this->loadArray($arr, $overwrite);
    }
public function loadFromIni(string $iniPath, bool $overwrite = false): void
    {
        if (!file_exists($iniPath)) {
            return;
        }
        
        $iniArr = null;
        try {
            $iniArr = parse_ini_file($iniPath, false, INI_SCANNER_TYPED);
        } catch (\Throwable $e) {
        }
        if (!is_array($iniArr)) {
            return;
        }
        $iniArr = array_change_key_case($iniArr, CASE_LOWER);
        
        $arr = [];
        foreach ($iniArr as $name => $value) {
            $arr[lcfirst(str_replace('_', '', ucwords(str_replace('.', '_', $name), '_')))] = $value;
        }
        
        $this->loadArray($arr, $overwrite);
    }
public function loadFromIni ( string $ iniPath , bool $ overwrite = false ) : void { if ( ! file_exists ( $ iniPath ) ) { return ; } $ iniArr = null ; try { $ iniArr = parse_ini_file ( $ iniPath , false , INI_SCANNER_TYPED ) ; } catch ( \ Throwable $ e ) { } if ( ! is_array ( $ iniArr ) ) { return ; } $ iniArr = array_change_key_case ( $ iniArr , CASE_LOWER ) ; $ arr = [ ] ; foreach ( $ iniArr as $ name => $ value ) { $ arr [ lcfirst ( str_replace ( '_' , '' , ucwords ( str_replace ( '.' , '_' , $ name ) , '_' ) ) ) ] = $ value ; } $ this -> loadArray ( $ arr , $ overwrite ) ; }
Loads configuration from INI file.
@param string $iniPath
@param bool $overwrite = false
Loads configuration from INI file .