protected function loadConfigFile(string $fileKey, string $filePath)
    {
        $fileExtension = pathinfo($filePath, PATHINFO_EXTENSION);

        if ($fileExtension === 'json') {
            $this->loadJsonConfigFile($fileKey, $filePath);
            return;
        }

        if ($fileExtension === 'php') {
            $this->loadPhpConfigFile($fileKey, $filePath);
            return;
        }

        //@TODO : YAML
    }
protected function loadConfigFile(string $fileKey, string $filePath)
    {
        $fileExtension = pathinfo($filePath, PATHINFO_EXTENSION);

        if ($fileExtension === 'json') {
            $this->loadJsonConfigFile($fileKey, $filePath);
            return;
        }

        if ($fileExtension === 'php') {
            $this->loadPhpConfigFile($fileKey, $filePath);
            return;
        }

        //@TODO : YAML
    }
protected function loadConfigFile ( string $ fileKey , string $ filePath ) { $ fileExtension = pathinfo ( $ filePath , PATHINFO_EXTENSION ) ; if ( $ fileExtension === 'json' ) { $ this -> loadJsonConfigFile ( $ fileKey , $ filePath ) ; return ; } if ( $ fileExtension === 'php' ) { $ this -> loadPhpConfigFile ( $ fileKey , $ filePath ) ; return ; } //@TODO : YAML }
Load a config file.
Find the file's extension and call the method to parse the file

@param string $fileKey The file's key. Most of the time, the path to
the file from the $this->configDir value
@param string $filePath The path to the file

@return void
Load a config file . Find the file s extension and call the method to parse the file