protected function mapArray(array $array, array $path, array $params)
	{
		$key  = array_shift($path);
		$keys = ($key === '*') ? array_keys($array) : [$key];
		foreach ($keys as $key)
		{
			if (!isset($array[$key]))
			{
				continue;
			}
			$array[$key] = (empty($path)) ? $this->generateFunction($array[$key], $params) : $this->mapArray($array[$key], $path, $params);
		}

		return $array;
	}
protected function mapArray(array $array, array $path, array $params)
	{
		$key  = array_shift($path);
		$keys = ($key === '*') ? array_keys($array) : [$key];
		foreach ($keys as $key)
		{
			if (!isset($array[$key]))
			{
				continue;
			}
			$array[$key] = (empty($path)) ? $this->generateFunction($array[$key], $params) : $this->mapArray($array[$key], $path, $params);
		}

		return $array;
	}
protected function mapArray ( array $ array , array $ path , array $ params ) { $ key = array_shift ( $ path ) ; $ keys = ( $ key === '*' ) ? array_keys ( $ array ) : [ $ key ] ; foreach ( $ keys as $ key ) { if ( ! isset ( $ array [ $ key ] ) ) { continue ; } $ array [ $ key ] = ( empty ( $ path ) ) ? $ this -> generateFunction ( $ array [ $ key ] , $ params ) : $ this -> mapArray ( $ array [ $ key ] , $ path , $ params ) ; } return $ array ; }
Replace callbacks in given config array

@param  array    $array  Original config
@param  string[] $path   Path to callbacks
@param  array    $params Default params
@return array            Modified config
Replace callbacks in given config array