Aspose.Barcode for PHP via Java Generation and Recognition API docs

Inherits BaseJavaClass.

Public Member Functions

 __construct ()
 
 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 ()
 
- Public Member Functions inherited from BaseJavaClass
 __construct ($javaClass)
 
 getJavaClass ()
 
 getJavaClassName ()
 
 isNull ()
 
 printJavaClassName ()
 

Static Public Member Functions

static construct ($javaClass)
 

Protected Member Functions

 init ()
 
- Protected Member Functions inherited from BaseJavaClass
 setJavaClass ($javaClass)
 

Static Private Attributes

static $javaClassName = "com.aspose.mw.barcode.complexbarcode.MwAddress"
 

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 ( )

Member Function Documentation

◆ clear()

Address::clear ( )

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

◆ construct()

static Address::construct (   $javaClass)
static

◆ equals()

Address::equals ( Address  $obj)

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

Parameters
Address$objThe 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.

◆ 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
stringThe 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.

◆ 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$valueThe 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$valueThe 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$valueThe 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$valueThe house number.

◆ 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$valueThe 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$valueThe 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$valueThe 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$valueThe town or city.

Member Data Documentation

◆ $javaClassName

Address::$javaClassName = "com.aspose.mw.barcode.complexbarcode.MwAddress"
staticprivate