src/Core/ModuleLoader/ModuleLoader.php
public function addConfig(array $conf = array())
    {
        $appConfig =& $this->config;

        // Iterate through new top-level keys
        foreach ($conf as $key => $value) {

            // If doesnt exist yet, create it
            if (!isset($appConfig[$key])) {
                $appConfig[$key] = $value;
                continue;
            }

            // If it exists, and is already an array
            if (is_array($appConfig[$key])) {
                $mergedArray = array_merge_recursive($appConfig[$key], $value);
                $appConfig[$key] = $mergedArray;
                continue;
            }

            //@TODO check for iterators?

            // Just set the value already!
            $appConfig[$key] = $value;
        }
    }
public function addConfig(array $conf = array())
    {
        $appConfig =& $this->config;

        // Iterate through new top-level keys
        foreach ($conf as $key => $value) {

            // If doesnt exist yet, create it
            if (!isset($appConfig[$key])) {
                $appConfig[$key] = $value;
                continue;
            }

            // If it exists, and is already an array
            if (is_array($appConfig[$key])) {
                $mergedArray = array_merge_recursive($appConfig[$key], $value);
                $appConfig[$key] = $mergedArray;
                continue;
            }

            //@TODO check for iterators?

            // Just set the value already!
            $appConfig[$key] = $value;
        }
    }
public function addConfig ( array $ conf = array ( ) ) { $ appConfig = & $ this -> config ; // Iterate through new top-level keys foreach ( $ conf as $ key => $ value ) { // If doesnt exist yet, create it if ( ! isset ( $ appConfig [ $ key ] ) ) { $ appConfig [ $ key ] = $ value ; continue ; } // If it exists, and is already an array if ( is_array ( $ appConfig [ $ key ] ) ) { $ mergedArray = array_merge_recursive ( $ appConfig [ $ key ] , $ value ) ; $ appConfig [ $ key ] = $ mergedArray ; continue ; } //@TODO check for iterators? // Just set the value already! $ appConfig [ $ key ] = $ value ; } }
Recursively merge array of settings into app
config. This is needed because \Slim\ConfigurationHander doesn't
seem to like recursing...

@param array $conf
Recursively merge array of settings into app config . This is needed because \ Slim \ ConfigurationHander doesn t seem to like recursing ...