protected function flattenString($preString, array $strings, array &$flatten)
	{
		foreach ($strings as $key => $string)
		{
			if (strlen($preString) > 0)
			{
				$key = $preString.$this->delimiter.$key;
			}
			if ( ! is_array($string))
			{
				if (isset($flatten[$key]))
				{
					// we have a problem, 2 strings with the same key.
					throw new DuplicateKeyException("The key '$key' was found twice in the ".$this->locale." locale");
				}
				$flatten[$key] = $string;
				continue;
			}

			// recursive call
			$this->flattenString($key, $string, $flatten);
		}
	}
protected function flattenString($preString, array $strings, array &$flatten)
	{
		foreach ($strings as $key => $string)
		{
			if (strlen($preString) > 0)
			{
				$key = $preString.$this->delimiter.$key;
			}
			if ( ! is_array($string))
			{
				if (isset($flatten[$key]))
				{
					// we have a problem, 2 strings with the same key.
					throw new DuplicateKeyException("The key '$key' was found twice in the ".$this->locale." locale");
				}
				$flatten[$key] = $string;
				continue;
			}

			// recursive call
			$this->flattenString($key, $string, $flatten);
		}
	}
protected function flattenString ( $ preString , array $ strings , array & $ flatten ) { foreach ( $ strings as $ key => $ string ) { if ( strlen ( $ preString ) > 0 ) { $ key = $ preString . $ this -> delimiter . $ key ; } if ( ! is_array ( $ string ) ) { if ( isset ( $ flatten [ $ key ] ) ) { // we have a problem, 2 strings with the same key. throw new DuplicateKeyException ( "The key '$key' was found twice in the " . $ this -> locale . " locale" ) ; } $ flatten [ $ key ] = $ string ; continue ; } // recursive call $ this -> flattenString ( $ key , $ string , $ flatten ) ; } }
Flattens the given string array with the given pre String.

@recursive
@param string $preString
@param array $strings
@param array $flatten
@throws DuplicateKeyException
Flattens the given string array with the given pre String .