Formulas/Resources/Formulas/Formula.php
private function getTypedDimensionAspectValue( $source, $componentPath, $evaluationResult, $typedDimension, $log )
	{
		$result = $this->getComponentForPath( $source, $componentPath, 'typedMember', $evaluationResult, $typedDimension, $log, $contextRef );
		$context = Dimension::contextToIndex( $result, false, $this, $typedDimension );

		if ( ! $this->typedDimensionRule )
		{
			return $context;
		}

		$this->context = $context;
		$this->contextRef = $contextRef;

		foreach ( $this->typedDimensionRule as $typedDimensionRule )
		{
			/**
			 * @var TypedDimension $typed
			 */
			$typed = TypedDimension::fromArray( $typedDimensionRule );
			$dimensionClark = "{{$typed->dimension['namespace']}}{$typed->dimension['name']}";
			if ( ! empty( $typedDimension ) )
				if ( $dimensionClark != $typedDimension ) continue;
			$typed->aspectDimension = $typedDimension;
			$this->context = $typed->getValue( $this, $evaluationResult, $log );
		}

		$typedDimensions = $this->context;
		unset( $this->context );
		unset( $this->contextRef );

		return $typedDimensions;
	}
private function getTypedDimensionAspectValue( $source, $componentPath, $evaluationResult, $typedDimension, $log )
	{
		$result = $this->getComponentForPath( $source, $componentPath, 'typedMember', $evaluationResult, $typedDimension, $log, $contextRef );
		$context = Dimension::contextToIndex( $result, false, $this, $typedDimension );

		if ( ! $this->typedDimensionRule )
		{
			return $context;
		}

		$this->context = $context;
		$this->contextRef = $contextRef;

		foreach ( $this->typedDimensionRule as $typedDimensionRule )
		{
			/**
			 * @var TypedDimension $typed
			 */
			$typed = TypedDimension::fromArray( $typedDimensionRule );
			$dimensionClark = "{{$typed->dimension['namespace']}}{$typed->dimension['name']}";
			if ( ! empty( $typedDimension ) )
				if ( $dimensionClark != $typedDimension ) continue;
			$typed->aspectDimension = $typedDimension;
			$this->context = $typed->getValue( $this, $evaluationResult, $log );
		}

		$typedDimensions = $this->context;
		unset( $this->context );
		unset( $this->contextRef );

		return $typedDimensions;
	}
private function getTypedDimensionAspectValue ( $ source , $ componentPath , $ evaluationResult , $ typedDimension , $ log ) { $ result = $ this -> getComponentForPath ( $ source , $ componentPath , 'typedMember' , $ evaluationResult , $ typedDimension , $ log , $ contextRef ) ; $ context = Dimension :: contextToIndex ( $ result , false , $ this , $ typedDimension ) ; if ( ! $ this -> typedDimensionRule ) { return $ context ; } $ this -> context = $ context ; $ this -> contextRef = $ contextRef ; foreach ( $ this -> typedDimensionRule as $ typedDimensionRule ) { /**
			 * @var TypedDimension $typed
			 */ $ typed = TypedDimension :: fromArray ( $ typedDimensionRule ) ; $ dimensionClark = "{{$typed->dimension['namespace']}}{$typed->dimension['name']}" ; if ( ! empty ( $ typedDimension ) ) if ( $ dimensionClark != $ typedDimension ) continue ; $ typed -> aspectDimension = $ typedDimension ; $ this -> context = $ typed -> getValue ( $ this , $ evaluationResult , $ log ) ; } $ typedDimensions = $ this -> context ; unset ( $ this -> context ) ; unset ( $ this -> contextRef ) ; return $ typedDimensions ; }
Get the typed diemsion to be used for this fact.  If an typed dimension rule does not exist, use the formula source value
@param array $source
@param string $componentPath
@param array $evaluationResult
@param string $typedDimension
@param \XBRL_Log $log
@return array|null
Get the typed diemsion to be used for this fact . If an typed dimension rule does not exist use the formula source value