public static function OperatorPlus( $val1, $val2 )
	{
		if ( ! $val1 instanceof ValueProxy )
		{
			/**
			 * @var ValueProxyFactory $f
			 */
			$f = isset( ValueProxy::$valueFactory[ Type::FromValue( $val1 )->getTypeName() ] )
				? ValueProxy::$valueFactory[ Type::FromValue( $val1 )->getTypeName() ]
				: null;

			if ( is_null( $f ) ) return false;
			$val1 = $f->Create( $val1 instanceof XPath2Item ? $val1->getTypedValue() : $val1 );
		}

		if ( ! $val2 instanceof ValueProxy )
		{
			/**
			 * @var ValueProxyFactory $f
			 */
			$f = isset( ValueProxy::$valueFactory[ Type::FromValue( $val2 )->getTypeName() ] )
				? ValueProxy::$valueFactory[ Type::FromValue( $val2 )->getTypeName() ]
				: null;

			if ( is_null( $f ) ) return false;
			$val2 = $f->Create( $val2 );
		}

		switch ( ValueProxy::$conv_t[ $val1->GetValueCode() ][ $val2->GetValueCode() ] )
		{
			case -1:
				return  $val2->Promote( $val1 )->Add( $val2 );

			case 0:
				return  $val1->Add( $val2 );

			case 1:
				return  $val1->Add( $val1->Promote( $val2 ) );

			default:
				{
					if ( ValueProxy::$conv_t[ $val2->GetValueCode() ][ $val1->GetValueCode() ] == 1 )
						return $val2->Promote( $val1)->Add( $val2 );

					throw XPath2Exception::withErrorCodeAndParams( "XPTY0004", Resources::BinaryOperatorNotDefined,
						array(
							"op:add",
							SequenceType::WithTypeCodeAndCardinality( SequenceType::GetXmlTypeCodeFromObject( $val1 ), XmlTypeCardinality::One ),
							SequenceType::WithTypeCodeAndCardinality( SequenceType::GetXmlTypeCodeFromObject( $val2 ), XmlTypeCardinality::One )
						)
					);
				}
		}
	}
public static function OperatorPlus( $val1, $val2 )
	{
		if ( ! $val1 instanceof ValueProxy )
		{
			/**
			 * @var ValueProxyFactory $f
			 */
			$f = isset( ValueProxy::$valueFactory[ Type::FromValue( $val1 )->getTypeName() ] )
				? ValueProxy::$valueFactory[ Type::FromValue( $val1 )->getTypeName() ]
				: null;

			if ( is_null( $f ) ) return false;
			$val1 = $f->Create( $val1 instanceof XPath2Item ? $val1->getTypedValue() : $val1 );
		}

		if ( ! $val2 instanceof ValueProxy )
		{
			/**
			 * @var ValueProxyFactory $f
			 */
			$f = isset( ValueProxy::$valueFactory[ Type::FromValue( $val2 )->getTypeName() ] )
				? ValueProxy::$valueFactory[ Type::FromValue( $val2 )->getTypeName() ]
				: null;

			if ( is_null( $f ) ) return false;
			$val2 = $f->Create( $val2 );
		}

		switch ( ValueProxy::$conv_t[ $val1->GetValueCode() ][ $val2->GetValueCode() ] )
		{
			case -1:
				return  $val2->Promote( $val1 )->Add( $val2 );

			case 0:
				return  $val1->Add( $val2 );

			case 1:
				return  $val1->Add( $val1->Promote( $val2 ) );

			default:
				{
					if ( ValueProxy::$conv_t[ $val2->GetValueCode() ][ $val1->GetValueCode() ] == 1 )
						return $val2->Promote( $val1)->Add( $val2 );

					throw XPath2Exception::withErrorCodeAndParams( "XPTY0004", Resources::BinaryOperatorNotDefined,
						array(
							"op:add",
							SequenceType::WithTypeCodeAndCardinality( SequenceType::GetXmlTypeCodeFromObject( $val1 ), XmlTypeCardinality::One ),
							SequenceType::WithTypeCodeAndCardinality( SequenceType::GetXmlTypeCodeFromObject( $val2 ), XmlTypeCardinality::One )
						)
					);
				}
		}
	}
public static function OperatorPlus ( $ val1 , $ val2 ) { if ( ! $ val1 instanceof ValueProxy ) { /**
			 * @var ValueProxyFactory $f
			 */ $ f = isset ( ValueProxy :: $ valueFactory [ Type :: FromValue ( $ val1 ) -> getTypeName ( ) ] ) ? ValueProxy :: $ valueFactory [ Type :: FromValue ( $ val1 ) -> getTypeName ( ) ] : null ; if ( is_null ( $ f ) ) return false ; $ val1 = $ f -> Create ( $ val1 instanceof XPath2Item ? $ val1 -> getTypedValue ( ) : $ val1 ) ; } if ( ! $ val2 instanceof ValueProxy ) { /**
			 * @var ValueProxyFactory $f
			 */ $ f = isset ( ValueProxy :: $ valueFactory [ Type :: FromValue ( $ val2 ) -> getTypeName ( ) ] ) ? ValueProxy :: $ valueFactory [ Type :: FromValue ( $ val2 ) -> getTypeName ( ) ] : null ; if ( is_null ( $ f ) ) return false ; $ val2 = $ f -> Create ( $ val2 ) ; } switch ( ValueProxy :: $ conv_t [ $ val1 -> GetValueCode ( ) ] [ $ val2 -> GetValueCode ( ) ] ) { case - 1 : return $ val2 -> Promote ( $ val1 ) -> Add ( $ val2 ) ; case 0 : return $ val1 -> Add ( $ val2 ) ; case 1 : return $ val1 -> Add ( $ val1 -> Promote ( $ val2 ) ) ; default : { if ( ValueProxy :: $ conv_t [ $ val2 -> GetValueCode ( ) ] [ $ val1 -> GetValueCode ( ) ] == 1 ) return $ val2 -> Promote ( $ val1 ) -> Add ( $ val2 ) ; throw XPath2Exception :: withErrorCodeAndParams ( "XPTY0004" , Resources :: BinaryOperatorNotDefined , array ( "op:add" , SequenceType :: WithTypeCodeAndCardinality ( SequenceType :: GetXmlTypeCodeFromObject ( $ val1 ) , XmlTypeCardinality :: One ) , SequenceType :: WithTypeCodeAndCardinality ( SequenceType :: GetXmlTypeCodeFromObject ( $ val2 ) , XmlTypeCardinality :: One ) ) ) ; } } }
Equivalent of the '+' operator
@param ValueProxy $val1
@param ValueProxy $val2
@return \lyquidity\XPath2\Proxy\ValueProxy
Equivalent of the + operator