Formulas/Resources/Formulas/Aspects/Dimension.php
public static function IndexToContext( $index )
	{
		$result = array();
		foreach ( $index as $dimension => $members )
		{
			foreach ( $members as $memberQName => $member )
			{
				if ( is_array( $member ) )
				{
					$x = array( $memberQName => $member );
					// Remove the dimension from the member
					foreach ( $x as $key => $xml )
					{
						// $x[ $key ] =  str_replace( "</$memberQName>", "", str_replace( "<$memberQName>", "", $xml ) );
					}
					$result[] = array( 'dimension' => $dimension, 'member' => $x );
				}
				else
				{
					$result[] = array( 'dimension' => $dimension, 'member' => $member );
				}
			}
		}

		return $result;
	}
public static function IndexToContext( $index )
	{
		$result = array();
		foreach ( $index as $dimension => $members )
		{
			foreach ( $members as $memberQName => $member )
			{
				if ( is_array( $member ) )
				{
					$x = array( $memberQName => $member );
					// Remove the dimension from the member
					foreach ( $x as $key => $xml )
					{
						// $x[ $key ] =  str_replace( "</$memberQName>", "", str_replace( "<$memberQName>", "", $xml ) );
					}
					$result[] = array( 'dimension' => $dimension, 'member' => $x );
				}
				else
				{
					$result[] = array( 'dimension' => $dimension, 'member' => $member );
				}
			}
		}

		return $result;
	}
public static function IndexToContext ( $ index ) { $ result = array ( ) ; foreach ( $ index as $ dimension => $ members ) { foreach ( $ members as $ memberQName => $ member ) { if ( is_array ( $ member ) ) { $ x = array ( $ memberQName => $ member ) ; // Remove the dimension from the member
 foreach ( $ x as $ key => $ xml ) { // $x[ $key ] =  str_replace( "</$memberQName>", "", str_replace( "<$memberQName>", "", $xml ) );
 } $ result [ ] = array ( 'dimension' => $ dimension , 'member' => $ x ) ; } else { $ result [ ] = array ( 'dimension' => $ dimension , 'member' => $ member ) ; } } } return $ result ; }
Convert a dimension into a context
@param array $index
@return array
Convert a dimension into a context