Beispiel #1
0
 /**
  * Merges the given array with the config array. It uses the keys/values from config/container.php.
  */
 static function setConfig($tconfig)
 {
     if (!is_array(self::$config)) {
         self::loadConfig();
     }
     self::$config = array_merge(self::$config, $tconfig);
 }
Beispiel #2
0
 private static function loadConfig()
 {
     global $shindigConfig;
     if (!self::$config) {
         // load default configuration
         include_once 'config/container.php';
         self::$config = $shindigConfig;
         $localConfigPath = realpath(dirname(__FILE__) . "/../../config/local.php");
         if (file_exists($localConfigPath)) {
             // include local.php if it exists and merge the config arrays.
             // the second array values overwrites the first one's
             include_once $localConfigPath;
             self::$config = array_merge(self::$config, $shindigConfig);
         }
     }
 }