XBRL-Instance.php
public function hasDimension( $contextRef, $dimension, $includeDefault = false )
	{
		if ( ! isset( $this->contexts[ $contextRef ] ) )
		{
			return false;
		}

		$paths = array(
			array( 'entity', 'segment' ),
			array( 'scenario' ),
			array( 'entity', 'scenario' ),
			array( 'segment' ),
		);

		foreach ( $paths as $path )
		{
			$context = $this->contexts[ $contextRef ];
			foreach ( $path as $element )
			{
				if ( ! isset( $context[ $element ] ) ) continue 2;
				$context = $context[ $element ];
			}

			if ( isset( $context['explicitMember'] ) )
			{
				foreach ( $context['explicitMember'] as $dimensionDefinition )
				{
					if ( $dimensionDefinition['dimension'] == $dimension ) return true;
				}
			}

			if ( isset( $context['typedMember'] ) )
			{
				foreach ( $context['typedMember'] as $dimensionDefinition )
				{
					if ( $dimensionDefinition['dimension'] == $dimension ) return true;
				}
			}
		}

		return false;
	}
public function hasDimension( $contextRef, $dimension, $includeDefault = false )
	{
		if ( ! isset( $this->contexts[ $contextRef ] ) )
		{
			return false;
		}

		$paths = array(
			array( 'entity', 'segment' ),
			array( 'scenario' ),
			array( 'entity', 'scenario' ),
			array( 'segment' ),
		);

		foreach ( $paths as $path )
		{
			$context = $this->contexts[ $contextRef ];
			foreach ( $path as $element )
			{
				if ( ! isset( $context[ $element ] ) ) continue 2;
				$context = $context[ $element ];
			}

			if ( isset( $context['explicitMember'] ) )
			{
				foreach ( $context['explicitMember'] as $dimensionDefinition )
				{
					if ( $dimensionDefinition['dimension'] == $dimension ) return true;
				}
			}

			if ( isset( $context['typedMember'] ) )
			{
				foreach ( $context['typedMember'] as $dimensionDefinition )
				{
					if ( $dimensionDefinition['dimension'] == $dimension ) return true;
				}
			}
		}

		return false;
	}
public function hasDimension ( $ contextRef , $ dimension , $ includeDefault = false ) { if ( ! isset ( $ this -> contexts [ $ contextRef ] ) ) { return false ; } $ paths = array ( array ( 'entity' , 'segment' ) , array ( 'scenario' ) , array ( 'entity' , 'scenario' ) , array ( 'segment' ) , ) ; foreach ( $ paths as $ path ) { $ context = $ this -> contexts [ $ contextRef ] ; foreach ( $ path as $ element ) { if ( ! isset ( $ context [ $ element ] ) ) continue 2 ; $ context = $ context [ $ element ] ; } if ( isset ( $ context [ 'explicitMember' ] ) ) { foreach ( $ context [ 'explicitMember' ] as $ dimensionDefinition ) { if ( $ dimensionDefinition [ 'dimension' ] == $ dimension ) return true ; } } if ( isset ( $ context [ 'typedMember' ] ) ) { foreach ( $ context [ 'typedMember' ] as $ dimensionDefinition ) { if ( $ dimensionDefinition [ 'dimension' ] == $ dimension ) return true ; } } } return false ; }
Returns true if the dimension reference can be found in a segment or scenario
@param string $contextRef
@param string $dimension
@param boolean $includeDefault
@return boolean
Returns true if the dimension reference can be found in a segment or scenario