How is OOP achieved with configuration files in PHP?
I personally use defines for for settings rather than utilising arrays. 

A singleton is the correct route to go down and to help reduce your code and array you may want to use external files. 

This is my config loader class with some simple caching that supports both database and file;

&lt;?php
/**
 * Config loader 
 */
final class Config extends Singleton{
    public static $loadedConfigs = array();

    /**
     * Get specific config value
     * 
     * @param String $scope  Configuration scope, used to determine config location
     * @param String $module Specific config module name
     * @param String $param  (optional) Specific config option
     * 
     * @return Mixed    Requested parameter value if requested, otherwise associative array or configuration key:pair values unless config file couldn't be loaded, then false
     * @author Dean Whitehouse
     * @copyright Dean Whitehouse 2014
     * @todo verify the config name is a valid one 
     */
    public static function get($scope, $module, $param = null){
        if($param !== null &amp;&amp; $param != ''){
            $const = strtoupper((string)$param);
        }

        $errorAppend = '; requested scope `'.$scope.'` with module `'.$module.'`;'.($param !== null ? 'Parameter requested `'.$param.'`' : '');

        if(isset(static::$loadedConfigs[$scope][$module])){
            $config = static::$loadedConfigs[$scope][$module];

            if(isset($const)){
                if(!isset($config[$const])){
                    error_log('Constant `'.$const.'` undefined'.$errorAppend);
                    return false;
                }
                else
                    $config = $config[$const];
            }
            return $config;
        }
        else{
            if($scope == 'core'){
                $file = '_app/core/config/'.$module.'.config.php';

                if(!file_exists($file)){
                    error_log('Config file doesn\'t exist at `'.$file.'`'.$errorAppend);
                    return false;
                }
                else{
                    $consts = get_defined_constants(true);
                    $consts = isset($consts['user']) ? $consts['user'] : array();

                    require_once $file;

                    $new = get_defined_constants(true);
                    $new = $new['user'];
                    $diff = array_diff_assoc($new, $consts);
                    static::$loadedConfigs[$scope][$module] = $diff;

                    if(isset($const)){
                        if(defined($const))
                            return constant($const);
                        else{
                            error_log('Constant `'.$const.'` undefined'.$errorAppend);
                            return false;
                        }
                    }

                    return static::$loadedConfigs[$scope][$module];
                }
            }
            elseif($scope == 'coreDB'){
                $check = db\sqli::query("SHOW TABLES LIKE '".db\sqli::escape($module)."'; -- Database check");

                if($check-&gt;num_rows == 0){
                    error_log('Config table doesn\'t exist'.$errorAppend);
                    return false;
                }
                else{
                    $query = 'SELECT `key`, `value` FROM `'.db\sqli::escape($module).'`';
                    if($param !== null){
                        $query .= ' WHERE `key` = '.db\sqli::escape($param).' LIMIT 1';
                    }

                    $query = db\sqli::query($query);

                    if($query-&gt;num_rows &gt; 0){

                        $consts = get_defined_constants(true);
                        $consts = isset($consts['user']) ? $consts['user'] : array();

                        while($config = $query-&gt;fetch_assoc()){
                            define($config['key'], $config['value']);
                        }

                        $new = get_defined_constants(true);
                        $new = $new['user'];
                        $diff = array_diff_assoc($new, $consts);
                        static::$loadedConfigs[$scope][$module] = $diff;

                        if(isset($const)){
                            if(defined($const))
                                return constant($const);
                        }

                        return static::$loadedConfigs[$scope][$module];
                    }
                    else{
                        error_log('Constant `'.$const.'` undefined'.$errorAppend);
                        return false;
                    }

                }
            }
            else{
                error_log('Config scope `'.$scope.'` isn\'t recognised'.$errorAppend);
                return false;
            }
        }
    }

    /**
     * Load configuration module
     * 
     * @param String $scope  Configuration scope, used to determine config location
     * @param String $module Specific config module name
     * 
     * @return Mixed    False if configuration couldn't be loaded, otherwise associative array or configuration key:pair values
     * @author Dean Whitehouse
     * @copyright Dean Whitehouse 2014
     */
    public static function load($scope, $module){
        return static::get($scope, $module);
    }
}
?&gt;


I call it like:

Config::load('core', 'env');
Config::load('core', 'db');


Edit

Sample config file 'env.config.php'

&lt;?php        
define('AUTO_REPAIR', true);

define('APP_ROOT', rtrim($_SERVER['SCRIPT_NAME'], '/index.php')); //folder the root of the site is in - only if in a directory

define('SECURE', true);

define('LOG_DIR', '_app/logs/');

define('SECURE_KEY', ''); //used for CSRF, NONCE and Cookies
?&gt;