lib/Opauth/OpauthStrategy.php
public static function flattenArray($array, $prefix = null, $results = array()) {
		foreach ($array as $key => $val) {
			$name = (empty($prefix)) ? $key : $prefix."[$key]";

			if (is_array($val)) {
				$results = array_merge($results, self::flattenArray($val, $name));
			} else {
				$results[$name] = $val;
			}
		}

		return $results;
	}
public static function flattenArray($array, $prefix = null, $results = array()) {
		foreach ($array as $key => $val) {
			$name = (empty($prefix)) ? $key : $prefix."[$key]";

			if (is_array($val)) {
				$results = array_merge($results, self::flattenArray($val, $name));
			} else {
				$results[$name] = $val;
			}
		}

		return $results;
	}
public static function flattenArray ( $ array , $ prefix = null , $ results = array ( ) ) { foreach ( $ array as $ key => $ val ) { $ name = ( empty ( $ prefix ) ) ? $ key : $ prefix . "[$key]" ; if ( is_array ( $ val ) ) { $ results = array_merge ( $ results , self :: flattenArray ( $ val , $ name ) ) ; } else { $ results [ $ name ] = $ val ; } } return $ results ; }
Recursively converts multidimensional array into POST-friendly single dimensional array

@param array $array Array to be flatten
@param string $prefix String to be prefixed to flattened variable name
@param array $results Existing array of flattened inputs to be merged upon

@return array A single dimensional array with POST-friendly name
Recursively converts multidimensional array into POST - friendly single dimensional array