‪Aspose.Barcode for PHP via Java  22.4
‪Aspose.Barcode for PHP via Java Generation and Recognition API docs
Address Class Reference

Inherits BaseJavaClass.

Public Member Functions

 __construct ($arg)
 
 getType ()
 
 getName ()
 
 setName (string $value)
 
 getAddressLine1 ()
 
 setAddressLine1 (string $value)
 
 getAddressLine2 ()
 
 setAddressLine2 (string $value)
 
 getStreet ()
 
 setStreet (string $value)
 
 getHouseNo ()
 
 setHouseNo (string $value)
 
 getPostalCode ()
 
 setPostalCode (string $value)
 
 getTown ()
 
 setTown (string $value)
 
 getCountryCode ()
 
 setCountryCode (string $value)
 
 clear ()
 
 equals (Address $obj)
 
 hashCode ()
 
 getJavaClass ()
 
 getJavaClassName ()
 
 isNull ()
 
 printJavaClassName ()
 

Protected Member Functions

 init ()
 
 setJavaClass ($javaClass)
 

Detailed Description

Address of creditor or debtor.

You can either set street, house number, postal code and town (type structured address) or address line 1 and 2 (type combined address elements). The type is automatically set once any of these fields is set. Before setting the fields, the address type is undetermined. If fields of both types are set, the address type becomes conflicting. Name and country code must always be set unless all fields are empty.

Constructor & Destructor Documentation

◆ __construct()

Address::__construct (   $arg)

Reimplemented from BaseJavaClass.

Member Function Documentation

◆ clear()

Address::clear ( )

Clears all fields and sets the type to AddressType.Undetermined.

◆ equals()

Address::equals ( Address  $obj)

Determines whether the specified object is equal to the current object.

Parameters
Address$obj‪The object to compare with the current object.
Returns
‪bool true if the specified object is equal to the current object; otherwise, false.

◆ getAddressLine1()

Address::getAddressLine1 ( )

Gets the address line 1.

Address line 1 contains street name, house number or P.O. box.

Setting this field sets the address type to AddressType.CombinedElements unless it's already AddressType.Structured, in which case it becomes AddressType.Conflicting.

This field is only used for combined elements addresses and is optional.

Returns
‪string The address line 1.

◆ getAddressLine2()

Address::getAddressLine2 ( )

Gets the address line 2. Address line 2 contains postal code and town. Setting this field sets the address type to AddressType.CombinedElements unless it's already AddressType.Structured, in which case it becomes AddressType.Conflicting. This field is only used for combined elements addresses. For this type, it's mandatory.

Returns
‪string The address line 2.

◆ getCountryCode()

Address::getCountryCode ( )

Gets the two-letter ISO country code.

The country code is mandatory unless the entire address contains null or emtpy values.

Returns
‪string The ISO country code.

◆ getHouseNo()

Address::getHouseNo ( )

Gets the house number.

Setting this field sets the address type to AddressType.Structured unless it's already AddressType.CombinedElements, in which case it becomes AddressType.Conflicting.

This field is only used for structured addresses and is optional.

Returns
‪string The house number.

◆ getJavaClass()

BaseJavaClass::getJavaClass ( )
inherited

◆ getJavaClassName()

BaseJavaClass::getJavaClassName ( )
inherited

◆ getName()

Address::getName ( )

Gets the name, either the first and last name of a natural person or the company name of a legal person.

Returns
‪string The name.

◆ getPostalCode()

Address::getPostalCode ( )

Gets the postal code.

Setting this field sets the address type to AddressType.Structured unless it's already AddressType.CombinedElements, in which case it becomes AddressType.Conflicting.

This field is only used for structured addresses. For this type, it's mandatory.

Parameters
string‪The postal code.

◆ getStreet()

Address::getStreet ( )

Gets the street. The street must be speicfied without house number. Setting this field sets the address type to AddressType.Structured unless it's already AddressType.CombinedElements, in which case it becomes AddressType.Conflicting. This field is only used for structured addresses and is optional.

Returns
‪string The street.

◆ getTown()

Address::getTown ( )

Gets the town or city.

Setting this field sets the address type to AddressType.Structured unless it's already AddressType.CombinedElements, in which case it becomes AddressType.Conflicting.

This field is only used for structured addresses. For this type, it's mandatory.

Returns
‪string The town or city.

◆ getType()

Address::getType ( )

Gets the address type.

The address type is automatically set by either setting street / house number or address line 1 and 2. Before setting the fields, the address type is Undetermined. If fields of both types are set, the address type becomes Conflicting.

Returns
‪int The address type.

◆ hashCode()

Address::hashCode ( )

Gets the hash code for this instance.

Returns
‪int A hash code for the current object.

◆ init()

Address::init ( )
protected

Reimplemented from BaseJavaClass.

◆ isNull()

BaseJavaClass::isNull ( )
inherited

◆ printJavaClassName()

BaseJavaClass::printJavaClassName ( )
inherited

◆ setAddressLine1()

Address::setAddressLine1 ( string  $value)

Sets the address line 1.

Address line 1 contains street name, house number or P.O. box.

Setting this field sets the address type to AddressType.CombinedElements unless it's already AddressType.Structured, in which case it becomes AddressType.Conflicting.

This field is only used for combined elements addresses and is optional.

Parameters
string$value‪The address line 1.

◆ setAddressLine2()

Address::setAddressLine2 ( string  $value)

Sets the address line 2. Address line 2 contains postal code and town. Setting this field sets the address type to AddressType.CombinedElements unless it's already AddressType.Structured, in which case it becomes AddressType.Conflicting. This field is only used for combined elements addresses. For this type, it's mandatory.

Parameters
string$value‪The address line 2.

◆ setCountryCode()

Address::setCountryCode ( string  $value)

Sets the two-letter ISO country code.

The country code is mandatory unless the entire address contains null or emtpy values.

Parameters
string$value‪The ISO country code.

◆ setHouseNo()

Address::setHouseNo ( string  $value)

Sets the house number.

Setting this field sets the address type to AddressType.Structured unless it's already AddressType.CombinedElements, in which case it becomes AddressType.Conflicting.

This field is only used for structured addresses and is optional.

Parameters
string$value‪The house number.

◆ setJavaClass()

BaseJavaClass::setJavaClass (   $javaClass)
protectedinherited

◆ setName()

Address::setName ( string  $value)

Sets the name, either the first and last name of a natural person or the company name of a legal person.

Parameters
string$value‪The name.

◆ setPostalCode()

Address::setPostalCode ( string  $value)

Sets the postal code.

Setting this field sets the address type to AddressType.Structured unless it's already AddressType.CombinedElements, in which case it becomes AddressType.Conflicting.

This field is only used for structured addresses. For this type, it's mandatory.

Parameters
string$value‪The postal code.

◆ setStreet()

Address::setStreet ( string  $value)

Sets the street.

The street must be speicfied without house number.

Setting this field sets the address type to AddressType.Structured unless it's already AddressType.CombinedElements, in which case it becomes AddressType.Conflicting.

This field is only used for structured addresses and is optional.

Parameters
string$value‪The street.

◆ setTown()

Address::setTown ( string  $value)

Sets the town or city.

Setting this field sets the address type to AddressType.Structured unless it's already AddressType.CombinedElements, in which case it becomes AddressType.Conflicting.

This field is only used for structured addresses. For this type, it's mandatory.

Parameters
string$value‪The town or city.