Formulas/Resources/Formulas/Aspects/Dimension.php
public static function contextToIndex( $context, $explicit, $formula = null, $aspectDimension = null )
	{
		$result = array();

		foreach ( $context as $key => $dimension )
		{
			$qname = qname( $dimension['dimension'], $formula->xbrlInstance->getInstanceNamespaces() );
			if ( $qname->clarkNotation() != $aspectDimension ) continue;
			if ( $explicit )
			{
				$result[ $dimension['dimension'] ][ $dimension['member'] ] = $dimension['member'];
			}
			else
			{
				$result[ $dimension['dimension'] ] = $dimension['member'];
			}
		}

		return $result;
	}
public static function contextToIndex( $context, $explicit, $formula = null, $aspectDimension = null )
	{
		$result = array();

		foreach ( $context as $key => $dimension )
		{
			$qname = qname( $dimension['dimension'], $formula->xbrlInstance->getInstanceNamespaces() );
			if ( $qname->clarkNotation() != $aspectDimension ) continue;
			if ( $explicit )
			{
				$result[ $dimension['dimension'] ][ $dimension['member'] ] = $dimension['member'];
			}
			else
			{
				$result[ $dimension['dimension'] ] = $dimension['member'];
			}
		}

		return $result;
	}
public static function contextToIndex ( $ context , $ explicit , $ formula = null , $ aspectDimension = null ) { $ result = array ( ) ; foreach ( $ context as $ key => $ dimension ) { $ qname = qname ( $ dimension [ 'dimension' ] , $ formula -> xbrlInstance -> getInstanceNamespaces ( ) ) ; if ( $ qname -> clarkNotation ( ) != $ aspectDimension ) continue ; if ( $ explicit ) { $ result [ $ dimension [ 'dimension' ] ] [ $ dimension [ 'member' ] ] = $ dimension [ 'member' ] ; } else { $ result [ $ dimension [ 'dimension' ] ] = $ dimension [ 'member' ] ; } } return $ result ; }
Convers an XBRL_Instance version of a dimension segment or scenario to an indexed version
@param array $context
@param bool $explicit True if the array being converted prepresents an explicit dimension
@param Formula $formula
@param string $aspectDimension
@return array
Convers an XBRL_Instance version of a dimension segment or scenario to an indexed version