Formulas/Resources/Formulas/Aspects/Unit.php
public function getAdditionalNamespaces( $variableSet, $evaluationResult )
	{
		$namespaces = array();

		foreach ( $this->multiplyBy as $numerator )
		{
			if ( ! isset( $numerator['measure'] ) || ! $numerator['measure'] ) continue;

			// This is an expression that needs evaluating
			$result = $this->evaluateXPath( $variableSet, "{$numerator['measure']}", $evaluationResult['vars'] );
			if ( $result instanceof XPath2Item )
			{
				$result = $result->getTypedValue();
			}
			// Should report an error here
			if ( ! $result instanceof QNameValue ) continue;
			$namespaces[ $result->Prefix ] = $result->NamespaceUri;
		}

		foreach ( $this->divideBy as $denominator )
		{
			if ( ! isset( $denominator['measure'] ) || ! $denominator['measure'] ) continue;

			// This is an expression that needs evaluating
			$result = $this->evaluateXPath( $variableSet, "{$denominator['measure']}", $evaluationResult['vars'] );
			if ( $result instanceof XPath2Item )
			{
				$result = $result->getTypedValue();
			}
			// Should report an error here
			if ( ! $result instanceof QNameValue ) continue;
			$namespaces[ $result->Prefix ] = $result->NamespaceUri;
		}

		return $namespaces;
	}
public function getAdditionalNamespaces( $variableSet, $evaluationResult )
	{
		$namespaces = array();

		foreach ( $this->multiplyBy as $numerator )
		{
			if ( ! isset( $numerator['measure'] ) || ! $numerator['measure'] ) continue;

			// This is an expression that needs evaluating
			$result = $this->evaluateXPath( $variableSet, "{$numerator['measure']}", $evaluationResult['vars'] );
			if ( $result instanceof XPath2Item )
			{
				$result = $result->getTypedValue();
			}
			// Should report an error here
			if ( ! $result instanceof QNameValue ) continue;
			$namespaces[ $result->Prefix ] = $result->NamespaceUri;
		}

		foreach ( $this->divideBy as $denominator )
		{
			if ( ! isset( $denominator['measure'] ) || ! $denominator['measure'] ) continue;

			// This is an expression that needs evaluating
			$result = $this->evaluateXPath( $variableSet, "{$denominator['measure']}", $evaluationResult['vars'] );
			if ( $result instanceof XPath2Item )
			{
				$result = $result->getTypedValue();
			}
			// Should report an error here
			if ( ! $result instanceof QNameValue ) continue;
			$namespaces[ $result->Prefix ] = $result->NamespaceUri;
		}

		return $namespaces;
	}
public function getAdditionalNamespaces ( $ variableSet , $ evaluationResult ) { $ namespaces = array ( ) ; foreach ( $ this -> multiplyBy as $ numerator ) { if ( ! isset ( $ numerator [ 'measure' ] ) || ! $ numerator [ 'measure' ] ) continue ; // This is an expression that needs evaluating
 $ result = $ this -> evaluateXPath ( $ variableSet , "{$numerator['measure']}" , $ evaluationResult [ 'vars' ] ) ; if ( $ result instanceof XPath2Item ) { $ result = $ result -> getTypedValue ( ) ; } // Should report an error here
 if ( ! $ result instanceof QNameValue ) continue ; $ namespaces [ $ result -> Prefix ] = $ result -> NamespaceUri ; } foreach ( $ this -> divideBy as $ denominator ) { if ( ! isset ( $ denominator [ 'measure' ] ) || ! $ denominator [ 'measure' ] ) continue ; // This is an expression that needs evaluating
 $ result = $ this -> evaluateXPath ( $ variableSet , "{$denominator['measure']}" , $ evaluationResult [ 'vars' ] ) ; if ( $ result instanceof XPath2Item ) { $ result = $ result -> getTypedValue ( ) ; } // Should report an error here
 if ( ! $ result instanceof QNameValue ) continue ; $ namespaces [ $ result -> Prefix ] = $ result -> NamespaceUri ; } return $ namespaces ; }
Returns an array of additional prefixes and namespaces used by measures defined
@param Formula $variableSet
@param array $evaluationResult
@return array
Returns an array of additional prefixes and namespaces used by measures defined