Permalink
Browse files

Using ArrayUtils instead of Config objects for merging int array keys

  • Loading branch information...
1 parent d56cc9d commit fb3dfb4bbeed2546824ac3aa0a1c3b2f5a7d15e3 @Ocramius Ocramius committed Apr 12, 2012
Showing with 15 additions and 15 deletions.
  1. +15 −15 library/Zend/Module/Listener/ConfigListener.php
@@ -16,7 +16,7 @@ class ConfigListener extends AbstractListener
{
const STATIC_PATH = 'static_path';
const GLOB_PATH = 'glob_path';
-
+
/**
* @var array
*/
@@ -58,9 +58,9 @@ public function __construct(ListenerOptions $options = null)
}
/**
- * __invoke proxy to loadModule for easier attaching
- *
- * @param ModuleEvent $e
+ * __invoke proxy to loadModule for easier attaching
+ *
+ * @param ModuleEvent $e
* @return ConfigListener
*/
public function __invoke(ModuleEvent $e)
@@ -83,9 +83,9 @@ public function attach(EventCollection $events)
}
/**
- * Pass self to the ModuleEvent object early so everyone has access.
- *
- * @param ModuleEvent $e
+ * Pass self to the ModuleEvent object early so everyone has access.
+ *
+ * @param ModuleEvent $e
* @return ConfigListener
*/
public function loadModulesPre(ModuleEvent $e)
@@ -95,9 +95,9 @@ public function loadModulesPre(ModuleEvent $e)
}
/**
- * Merge the config for each module
- *
- * @param ModuleEvent $e
+ * Merge the config for each module
+ *
+ * @param ModuleEvent $e
* @return ConfigListener
*/
public function loadModule(ModuleEvent $e)
@@ -117,7 +117,7 @@ public function loadModule(ModuleEvent $e)
*
* This should really only be called by the module manager.
*
- * @param ModuleEvent $e
+ * @param ModuleEvent $e
* @return ConfigListener
*/
public function loadModulesPost(ModuleEvent $e)
@@ -207,7 +207,7 @@ public function addConfigGlobPaths($globPaths)
$this->addConfigPaths($globPaths, self::GLOB_PATH);
return $this;
}
-
+
/**
* Add a glob path of config files to merge after loading modules
*
@@ -231,7 +231,7 @@ public function addConfigStaticPaths($staticPaths)
$this->addConfigPaths($staticPaths, self::STATIC_PATH);
return $this;
}
-
+
/**
* Add a static path of config files to merge after loading modules
*
@@ -243,7 +243,7 @@ public function addConfigStaticPath($staticPath)
$this->addConfigPath($staticPath, self::STATIC_PATH);
return $this;
}
-
+
/**
* Add an array of paths of config files to merge after loading modules
*
@@ -344,7 +344,7 @@ protected function mergeTraversableConfig($config)
. 'instance of Zend\Config\Config. %s given.', gettype($config))
);
}
- $this->setMergedConfig(array_replace_recursive($this->mergedConfig, $config));
+ $this->setMergedConfig(ArrayUtils::merge($this->mergedConfig, $config));
}
/**

0 comments on commit fb3dfb4

Please sign in to comment.