Address
extends RosetteParamsSetBase
in package
implements
IAddress
Class that represents a fielded address.
Table of Contents
Interfaces
- IAddress
- Interface implemented by all Addresses
Properties
- $city : string
- The address city.
- $cityDistrict : string
- The address city district.
- $country : string
- The address country.
- $countryRegion : string
- The address country region.
- $entrance : string
- The address entrance.
- $house : string
- The address house.
- $houseNumber : string
- The address house number.
- $island : string
- The address island.
- $level : string
- The address level.
- $poBox : string
- The address P.O. Box.
- $postCode : string
- The address post code.
- $road : string
- The address road.
- $staircase : string
- The address staircase.
- $state : string
- The address state.
- $stateDistrict : string
- The address state district.
- $suburb : string
- The address suburb.
- $unit : string
- The address unit.
- $worldRegion : string
- The address world region.
Methods
- __construct() : mixed
- Constructor.
- fielded() : bool
- is this a fielded address?
- get() : mixed
- Gets a property value based on the property name.
- getMultiPartContent() : string
- Provides default multiPart call for child classes that don't implement it
- serialize() : string
- Serialize into a json string.
- set() : mixed
- Sets a property based on the name.
- validate() : mixed
- required validate function
- removeEmptyProperties() : mixed
- Recursively removes empty properties to facilitate json encoding.
Properties
$city
The address city.
public
string
$city
$cityDistrict
The address city district.
public
string
$cityDistrict
$country
The address country.
public
string
$country
$countryRegion
The address country region.
public
string
$countryRegion
$entrance
The address entrance.
public
string
$entrance
$house
The address house.
public
string
$house
$houseNumber
The address house number.
public
string
$houseNumber
$island
The address island.
public
string
$island
$level
The address level.
public
string
$level
$poBox
The address P.O. Box.
public
string
$poBox
$postCode
The address post code.
public
string
$postCode
$road
The address road.
public
string
$road
$staircase
The address staircase.
public
string
$staircase
$state
The address state.
public
string
$state
$stateDistrict
The address state district.
public
string
$stateDistrict
$suburb
The address suburb.
public
string
$suburb
$unit
The address unit.
public
string
$unit
$worldRegion
The address world region.
public
string
$worldRegion
Methods
__construct()
Constructor.
public
__construct([mixed $house = null ][, mixed $houseNumber = null ][, mixed $road = null ][, mixed $unit = null ][, mixed $level = null ][, mixed $staircase = null ][, mixed $entrance = null ][, mixed $suburb = null ][, mixed $cityDistrict = null ][, mixed $city = null ][, mixed $island = null ][, mixed $stateDistrict = null ][, mixed $state = null ][, mixed $countryRegion = null ][, mixed $country = null ][, mixed $worldRegion = null ][, mixed $postCode = null ][, mixed $poBox = null ]) : mixed
Parameters
- $house : mixed = null
- $houseNumber : mixed = null
- $road : mixed = null
- $unit : mixed = null
- $level : mixed = null
- $staircase : mixed = null
- $entrance : mixed = null
- $suburb : mixed = null
- $cityDistrict : mixed = null
- $city : mixed = null
- $island : mixed = null
- $stateDistrict : mixed = null
- $state : mixed = null
- $countryRegion : mixed = null
- $country : mixed = null
- $worldRegion : mixed = null
- $postCode : mixed = null
- $poBox : mixed = null
fielded()
is this a fielded address?
public
fielded() : bool
Return values
boolget()
Gets a property value based on the property name.
public
get(string $propertyName) : mixed
Parameters
- $propertyName : string
-
the name of the property
Tags
Return values
mixed —property value
getMultiPartContent()
Provides default multiPart call for child classes that don't implement it
public
getMultiPartContent() : string
Return values
stringserialize()
Serialize into a json string.
public
serialize(mixed $options) : string
Parameters
- $options : mixed
-
associative array of options
Return values
stringset()
Sets a property based on the name.
public
set(string $propertyName, mixed $value) : mixed
Parameters
- $propertyName : string
-
the name of the property
- $value : mixed
-
the value to set
validate()
required validate function
public
validate() : mixed
removeEmptyProperties()
Recursively removes empty properties to facilitate json encoding.
private
removeEmptyProperties(mixed $obj) : mixed
Parameters
- $obj : mixed
-
Object to clean