Formulas/Resources/Variables/VariableSet.php
public function AddVariable( &$variable )
	{
		$qname = $variable->getQName()->clarkNotation();
		if ( isset( $this->variablesByQName[ $qname ] ) )
		{
			$x = 1;
			\XBRL_Log::getInstance()->formula_validation( "Variable-set", "The variable name (defined on an arc) already exists", array(
				'name' => $qname->clarkNotation(),
				'error' => 'xbrlve:duplicateVariableNames'
			) );
			return false;
		}

		$this->variablesByQName[ $qname ] =& $variable;
		$this->variableLabelToQNameMap[ "{$variable->extendedLinkRoleUri}#{$variable->label}" ] = $qname;

		return true;
	}
public function AddVariable( &$variable )
	{
		$qname = $variable->getQName()->clarkNotation();
		if ( isset( $this->variablesByQName[ $qname ] ) )
		{
			$x = 1;
			\XBRL_Log::getInstance()->formula_validation( "Variable-set", "The variable name (defined on an arc) already exists", array(
				'name' => $qname->clarkNotation(),
				'error' => 'xbrlve:duplicateVariableNames'
			) );
			return false;
		}

		$this->variablesByQName[ $qname ] =& $variable;
		$this->variableLabelToQNameMap[ "{$variable->extendedLinkRoleUri}#{$variable->label}" ] = $qname;

		return true;
	}
public function AddVariable ( & $ variable ) { $ qname = $ variable -> getQName ( ) -> clarkNotation ( ) ; if ( isset ( $ this -> variablesByQName [ $ qname ] ) ) { $ x = 1 ; \ XBRL_Log :: getInstance ( ) -> formula_validation ( "Variable-set" , "The variable name (defined on an arc) already exists" , array ( 'name' => $ qname -> clarkNotation ( ) , 'error' => 'xbrlve:duplicateVariableNames' ) ) ; return false ; } $ this -> variablesByQName [ $ qname ] = & $ variable ; $ this -> variableLabelToQNameMap [ "{$variable->extendedLinkRoleUri}#{$variable->label}" ] = $ qname ; return true ; }
Add a variable, check for duplicates and update the lable -> qname map
@param Variable $variable (reference)
@return false;
Add a variable check for duplicates and update the lable - > qname map