Formulas/Resources/Formulas/Formula.php
private function getEntityIdentifierAspectValue( $source, $evaluationResult, $log )
	{

		// Get the entity identifier from the source
		if ( is_null( $this->entityIdentifierRule ) )
		{
			$context = $this->getContextForSource( $source, $evaluationResult, ASPECT_ENTITY_IDENTIFIER, $log, $contextRef );
			if ( ! $context || is_null( $context['entity']['identifier'] ) ) return null;

			// TODO What is in the $context array
			return $context['entity']['identifier'];
		}
		else
		{
			/**
			 * @var EntityIdentifier $identifier
			 */
			$identifier = EntityIdentifier::fromArray( $this->entityIdentifierRule );
			// This function will throw an exception if there is a problem so there is no return value to check
			$this->checkSAVConflicts( $identifier->source, ASPECT_ENTITY_IDENTIFIER, $evaluationResult, $log );
			return $identifier->getValue( $this, $evaluationResult, $log );
		}

	}
private function getEntityIdentifierAspectValue( $source, $evaluationResult, $log )
	{

		// Get the entity identifier from the source
		if ( is_null( $this->entityIdentifierRule ) )
		{
			$context = $this->getContextForSource( $source, $evaluationResult, ASPECT_ENTITY_IDENTIFIER, $log, $contextRef );
			if ( ! $context || is_null( $context['entity']['identifier'] ) ) return null;

			// TODO What is in the $context array
			return $context['entity']['identifier'];
		}
		else
		{
			/**
			 * @var EntityIdentifier $identifier
			 */
			$identifier = EntityIdentifier::fromArray( $this->entityIdentifierRule );
			// This function will throw an exception if there is a problem so there is no return value to check
			$this->checkSAVConflicts( $identifier->source, ASPECT_ENTITY_IDENTIFIER, $evaluationResult, $log );
			return $identifier->getValue( $this, $evaluationResult, $log );
		}

	}
private function getEntityIdentifierAspectValue ( $ source , $ evaluationResult , $ log ) { // Get the entity identifier from the source
 if ( is_null ( $ this -> entityIdentifierRule ) ) { $ context = $ this -> getContextForSource ( $ source , $ evaluationResult , ASPECT_ENTITY_IDENTIFIER , $ log , $ contextRef ) ; if ( ! $ context || is_null ( $ context [ 'entity' ] [ 'identifier' ] ) ) return null ; // TODO What is in the $context array
 return $ context [ 'entity' ] [ 'identifier' ] ; } else { /**
			 * @var EntityIdentifier $identifier
			 */ $ identifier = EntityIdentifier :: fromArray ( $ this -> entityIdentifierRule ) ; // This function will throw an exception if there is a problem so there is no return value to check
 $ this -> checkSAVConflicts ( $ identifier -> source , ASPECT_ENTITY_IDENTIFIER , $ evaluationResult , $ log ) ; return $ identifier -> getValue ( $ this , $ evaluationResult , $ log ) ; } }
Get the entity identifier to be used for this fact.  If an entity identifier rule does not exist, use the formula source value
@param array $source
@param array $evaluationResult
@param \XBRL_Log $log
@return array|NULL
Get the entity identifier to be used for this fact . If an entity identifier rule does not exist use the formula source value