Formulas/Resources/Variables/FactVariable.php
private function getDimensionFromComponent( $variableSet, $dimQName, $dimElement, $context )
	{
		$typed = isset( $dimElement['typedDomainRef'] );

		// Could be in context or in the entity
		foreach ( Formula::$componentPaths as $path )
		{
			$component = $this->getComponentForPath( $path, $context );
			if ( ! $component ) continue;

			// Look for the dimension type but if not found try a different path
			if ( ! isset( $component[ $typed ? 'typedMember' : 'explicitMember' ] ) ) continue;

			foreach ( $component[ $typed ? 'typedMember' : 'explicitMember' ] as $dimension )
			{
				// See if the qname of the dimension is the same at the aspect QName
				$qname = qname( $dimension['dimension'], $variableSet->xbrlInstance->getInstanceNamespaces() );
				if ( ! $qname->equals( $dimQName ) ) continue;

				return $dimension;
			}
		}

		return array();
	}
private function getDimensionFromComponent( $variableSet, $dimQName, $dimElement, $context )
	{
		$typed = isset( $dimElement['typedDomainRef'] );

		// Could be in context or in the entity
		foreach ( Formula::$componentPaths as $path )
		{
			$component = $this->getComponentForPath( $path, $context );
			if ( ! $component ) continue;

			// Look for the dimension type but if not found try a different path
			if ( ! isset( $component[ $typed ? 'typedMember' : 'explicitMember' ] ) ) continue;

			foreach ( $component[ $typed ? 'typedMember' : 'explicitMember' ] as $dimension )
			{
				// See if the qname of the dimension is the same at the aspect QName
				$qname = qname( $dimension['dimension'], $variableSet->xbrlInstance->getInstanceNamespaces() );
				if ( ! $qname->equals( $dimQName ) ) continue;

				return $dimension;
			}
		}

		return array();
	}
private function getDimensionFromComponent ( $ variableSet , $ dimQName , $ dimElement , $ context ) { $ typed = isset ( $ dimElement [ 'typedDomainRef' ] ) ; // Could be in context or in the entity
 foreach ( Formula :: $ componentPaths as $ path ) { $ component = $ this -> getComponentForPath ( $ path , $ context ) ; if ( ! $ component ) continue ; // Look for the dimension type but if not found try a different path
 if ( ! isset ( $ component [ $ typed ? 'typedMember' : 'explicitMember' ] ) ) continue ; foreach ( $ component [ $ typed ? 'typedMember' : 'explicitMember' ] as $ dimension ) { // See if the qname of the dimension is the same at the aspect QName
 $ qname = qname ( $ dimension [ 'dimension' ] , $ variableSet -> xbrlInstance -> getInstanceNamespaces ( ) ) ; if ( ! $ qname -> equals ( $ dimQName ) ) continue ; return $ dimension ; } } return array ( ) ; }
Retrieve the dimension information from a context
@param Formula $variableSet
@param QName $dimQName The QName of the defining dimension name
@param QName $dimElement The QName of the defining dimension member
@param array $context An array containing contet information
@return array
Retrieve the dimension information from a context