microptimize options and default merge and other string key array merges

This commit is contained in:
euromark 2014-04-08 01:25:14 +02:00
parent 8d47ef43e5
commit 0ece694a75
35 changed files with 121 additions and 133 deletions

View file

@ -201,7 +201,7 @@ class Helper extends Object {
*/
public function __get($name) {
if (isset($this->_helperMap[$name]) && !isset($this->{$name})) {
$settings = array_merge((array)$this->_helperMap[$name]['settings'], array('enabled' => false));
$settings = array('enabled' => false) + (array)$this->_helperMap[$name]['settings'];
$this->{$name} = $this->_View->loadHelper($this->_helperMap[$name]['class'], $settings);
}
if (isset($this->{$name})) {