PHP Configuration class Created this little config class, any room for improvements? Think I have done an alright job but would like to know if any improovements could be made?

&lt;?php
defined("SECURE") or exit('Please define SECURE keyword to continue.');
class config
{
    private $configValues;
    private $configFile;

    public function __construct()
    {
        $configValues = array();
    }

    public function loadConfiguration($configFile = "C:\Users\ashle\Miracle\config\config.ini")
    {
        if (!file_exists($configFile))
            loadDefault();

        $content = file($configFile);
        foreach ($content as $line)
            $this-&gt;setConfig(explode("=", $line)[0], explode("=", $line)[1]);
    }

    private function loadDefault()
    {
        /* DEFAULT CONFIG SETTINGS!!
           THIS SHOULD NOT BE THE CASE... */

        setConfig("database.host", "localhost");
        setConfig("database.username", "root");
        setConfig("database.password", "");
        setConfig("database.title", "mydb");
        setConfig("database.port", "3306");
    }

    private function setConfig($name, $value)
    {
        $this-&gt;configVlaues[$name] = $value;
    }

    public function getConfig($name)
    {
        return $this-&gt;configValues[$name];
    }
}
?&gt;
Things that just pop up in my mind when seeing the code (more of the architecture and robustness rather than language constructs):

1) Harcoding path to ini file

The path might have a meaning in your development environment, but it will mean nothing in a test or production environment. I would set it in an included file and use it from there. Something like:

$defaultConfigFilePath = "C:\Users\ashle\Miracle\config\config.ini";


in loadConfiguration
    $configFile = !isset($configFile) ? $defaultConfigFilePath : $configFile;

Hopefully, they will introduce a coalesce operator soon to simply write:

$configFile = $configFile ?? $defaultConfigFilePath;


2) Error handling

loadConfiguration function does not handle any incorrect formatting. Any line which is not in the format name=value will not be imported correctly.

You can explode into an $lineArray and check if elements are defined and exactly two.

3) A more powerful config reader

This is a good exercise, but ini files have a more complex format that seems to be handled by parse_ini_file function.