XBRL-Instance.php
private function validateExplicitMembers( $component, $contextId, $types, $componentName, &$data )
	{
		// The component should not be empty
		if ( XBRL_Instance::isEmpty( $component, 'dimension' ) || XBRL_Instance::isEmpty( $component, 'member' ) )
		{
			XBRL_Log::getInstance()->instance_validation(
				$componentName == XBRL_Constants::$xbrliScenario
					? "4.7.4"
					: "4.7.3.2", "A $componentName cannot be empty",
				array(
					'context' => $contextId
				)
			);
		}

		// To finish when doing dimensional validation
		if ( is_null( $data ) ) $data = array();

		// Anyone dimension should appear only once in a component
		if ( isset( $data[ $component['dimension'] ] ) )
		{
			$this->log()->dimension_validation(
				"3.1.4.2",
				"Dimensions have been repeated in scenario or segment components of a context",
				array(
					'context' => "'$contextId'",
					'dimension' => "'{$component['dimension']}'",
					'error' => 'xbrldie:RepeatedDimensionInInstanceError',
				)
			);

			return false;
		}

		// Record this for any future iteration
		$data[ $component['dimension'] ] = true;

		// $dimTaxonomy = $this->getInstanceTaxonomy()->getTaxonomyForNamespace( $item['dimension']['namespace'] );
		// $dimXsd = $dimTaxonomy->getTaxonomyXSD();
		// $dim = "$dimXsd#{$item['dimension']['element']['id']}";
		// $dimElement = $dimTaxonomy->getElementById( $dim );

		$parts = explode( ':', $component['dimension'] );
		$dimension = $this->getElementForReference( $parts[0], $parts[1], false );

		// The dimension MUST be explicit 3.1.4.5.2 xbrldie:ExplicitMemberNotExplicitDimensionError
		if ( ! $dimension ||
			 ! $types->resolveToSubstitutionGroup( $dimension['element']['substitutionGroup'], array( XBRL_Constants::$xbrldtDimensionItem ) ) ||
			 isset( $dimension['element']['typedDomainRef'] )
		)
		{
			$this->log()->dimension_validation(
				"3.1.4.5.2",
				"The dimension MUST resolve to an explicit dimension taxonomy element",
				array(
					'context' => "'$contextId'",
					'dimension' => "'{$component['dimension']}'",
					'error' => 'xbrldie:ExplicitMemberNotExplicitDimensionError',
				)
			);
		}

		$memElement = false;
		$parts = explode( ':', $component['member'] );
		$member = $this->getElementForReference( $parts[0], $parts[1], false );

		// The content of the xbrldi:explicitMember element MUST be a QName whose global element
		// definition can be found in the taxonomy schema referenced by the namespace of the QName.
		// A dimensional processor MUST raise an error xbrldie:ExplicitMemberUndefinedQNameError
		// if this rule is violated.

		if ( ! $member )
		{
			$this->log()->dimension_validation(
				"3.1.4.5.3",
				"The dimension member MUST resolve to a taxonomy element",
				array(
					'context' => "'$contextId'",
					'dimension' => "'{$component['dimension']}'",
					'member' => "'{$component['member']}'",
					'error' => 'xbrldie:ExplicitMemberUndefinedQNameError',
				)
			);
		}

		return true;
	}
private function validateExplicitMembers( $component, $contextId, $types, $componentName, &$data )
	{
		// The component should not be empty
		if ( XBRL_Instance::isEmpty( $component, 'dimension' ) || XBRL_Instance::isEmpty( $component, 'member' ) )
		{
			XBRL_Log::getInstance()->instance_validation(
				$componentName == XBRL_Constants::$xbrliScenario
					? "4.7.4"
					: "4.7.3.2", "A $componentName cannot be empty",
				array(
					'context' => $contextId
				)
			);
		}

		// To finish when doing dimensional validation
		if ( is_null( $data ) ) $data = array();

		// Anyone dimension should appear only once in a component
		if ( isset( $data[ $component['dimension'] ] ) )
		{
			$this->log()->dimension_validation(
				"3.1.4.2",
				"Dimensions have been repeated in scenario or segment components of a context",
				array(
					'context' => "'$contextId'",
					'dimension' => "'{$component['dimension']}'",
					'error' => 'xbrldie:RepeatedDimensionInInstanceError',
				)
			);

			return false;
		}

		// Record this for any future iteration
		$data[ $component['dimension'] ] = true;

		// $dimTaxonomy = $this->getInstanceTaxonomy()->getTaxonomyForNamespace( $item['dimension']['namespace'] );
		// $dimXsd = $dimTaxonomy->getTaxonomyXSD();
		// $dim = "$dimXsd#{$item['dimension']['element']['id']}";
		// $dimElement = $dimTaxonomy->getElementById( $dim );

		$parts = explode( ':', $component['dimension'] );
		$dimension = $this->getElementForReference( $parts[0], $parts[1], false );

		// The dimension MUST be explicit 3.1.4.5.2 xbrldie:ExplicitMemberNotExplicitDimensionError
		if ( ! $dimension ||
			 ! $types->resolveToSubstitutionGroup( $dimension['element']['substitutionGroup'], array( XBRL_Constants::$xbrldtDimensionItem ) ) ||
			 isset( $dimension['element']['typedDomainRef'] )
		)
		{
			$this->log()->dimension_validation(
				"3.1.4.5.2",
				"The dimension MUST resolve to an explicit dimension taxonomy element",
				array(
					'context' => "'$contextId'",
					'dimension' => "'{$component['dimension']}'",
					'error' => 'xbrldie:ExplicitMemberNotExplicitDimensionError',
				)
			);
		}

		$memElement = false;
		$parts = explode( ':', $component['member'] );
		$member = $this->getElementForReference( $parts[0], $parts[1], false );

		// The content of the xbrldi:explicitMember element MUST be a QName whose global element
		// definition can be found in the taxonomy schema referenced by the namespace of the QName.
		// A dimensional processor MUST raise an error xbrldie:ExplicitMemberUndefinedQNameError
		// if this rule is violated.

		if ( ! $member )
		{
			$this->log()->dimension_validation(
				"3.1.4.5.3",
				"The dimension member MUST resolve to a taxonomy element",
				array(
					'context' => "'$contextId'",
					'dimension' => "'{$component['dimension']}'",
					'member' => "'{$component['member']}'",
					'error' => 'xbrldie:ExplicitMemberUndefinedQNameError',
				)
			);
		}

		return true;
	}
private function validateExplicitMembers ( $ component , $ contextId , $ types , $ componentName , & $ data ) { // The component should not be empty
 if ( XBRL_Instance :: isEmpty ( $ component , 'dimension' ) || XBRL_Instance :: isEmpty ( $ component , 'member' ) ) { XBRL_Log :: getInstance ( ) -> instance_validation ( $ componentName == XBRL_Constants :: $ xbrliScenario ? "4.7.4" : "4.7.3.2" , "A $componentName cannot be empty" , array ( 'context' => $ contextId ) ) ; } // To finish when doing dimensional validation
 if ( is_null ( $ data ) ) $ data = array ( ) ; // Anyone dimension should appear only once in a component
 if ( isset ( $ data [ $ component [ 'dimension' ] ] ) ) { $ this -> log ( ) -> dimension_validation ( "3.1.4.2" , "Dimensions have been repeated in scenario or segment components of a context" , array ( 'context' => "'$contextId'" , 'dimension' => "'{$component['dimension']}'" , 'error' => 'xbrldie:RepeatedDimensionInInstanceError' , ) ) ; return false ; } // Record this for any future iteration
 $ data [ $ component [ 'dimension' ] ] = true ; // $dimTaxonomy = $this->getInstanceTaxonomy()->getTaxonomyForNamespace( $item['dimension']['namespace'] );
 // $dimXsd = $dimTaxonomy->getTaxonomyXSD();
 // $dim = "$dimXsd#{$item['dimension']['element']['id']}";
 // $dimElement = $dimTaxonomy->getElementById( $dim );
 $ parts = explode ( ':' , $ component [ 'dimension' ] ) ; $ dimension = $ this -> getElementForReference ( $ parts [ 0 ] , $ parts [ 1 ] , false ) ; // The dimension MUST be explicit 3.1.4.5.2 xbrldie:ExplicitMemberNotExplicitDimensionError
 if ( ! $ dimension || ! $ types -> resolveToSubstitutionGroup ( $ dimension [ 'element' ] [ 'substitutionGroup' ] , array ( XBRL_Constants :: $ xbrldtDimensionItem ) ) || isset ( $ dimension [ 'element' ] [ 'typedDomainRef' ] ) ) { $ this -> log ( ) -> dimension_validation ( "3.1.4.5.2" , "The dimension MUST resolve to an explicit dimension taxonomy element" , array ( 'context' => "'$contextId'" , 'dimension' => "'{$component['dimension']}'" , 'error' => 'xbrldie:ExplicitMemberNotExplicitDimensionError' , ) ) ; } $ memElement = false ; $ parts = explode ( ':' , $ component [ 'member' ] ) ; $ member = $ this -> getElementForReference ( $ parts [ 0 ] , $ parts [ 1 ] , false ) ; // The content of the xbrldi:explicitMember element MUST be a QName whose global element
 // definition can be found in the taxonomy schema referenced by the namespace of the QName.
 // A dimensional processor MUST raise an error xbrldie:ExplicitMemberUndefinedQNameError
 // if this rule is violated.
 if ( ! $ member ) { $ this -> log ( ) -> dimension_validation ( "3.1.4.5.3" , "The dimension member MUST resolve to a taxonomy element" , array ( 'context' => "'$contextId'" , 'dimension' => "'{$component['dimension']}'" , 'member' => "'{$component['member']}'" , 'error' => 'xbrldie:ExplicitMemberUndefinedQNameError' , ) ) ; } return true ; }
Used to validate explicit members in dimensional texonomies

@param array $component The explicit segment or scenario member information
@param string $contextId The id of the context
@param XBRL_Types $types
@param string $componentName The name of the component: scenario or segment
@param array|null $data An object of data created to pass information between function calls
@return boolean
Used to validate explicit members in dimensional texonomies