Address
extends BaseContent
in package
Implement address object
This class provides general interfaces to handle the address specific object operations.
Tags
Table of Contents
- $ : string|null
- $ : string|null
- $ : string|null
- $ : string|null
- $ : string|null
- $ : string|null
- $ : string|null
- $ : string|null
- $ : string|null
- $ : string|null
- $ : array<string|int, mixed>|null
- __construct() : mixed
- Construct a new address object
- ContactPerson() : array<string|int, mixed>|string|null
- Streamlined interface to get the contact person data
- Country() : string|null
- CountryCode() : string|null
- Data() : array<string|int, mixed>|null
- Direct get data method
- GeoCode() : array<string|int, mixed>|null
- Get go location information about this address
- Id() : string|null
- Get id of this address, is set as side effect of data setter
- IsFilled() : bool
- Has minimal required data
- Name() : string
- Get the name
- PhoneClear() : string|null
- RequireGeoCode() : bool
- Requires and can geo locate
- Salutation() : string|stdClass|null
- Get salutation
- SearchFields() : array<string|int, mixed>
- Get the list of searchable fields
- ToPlainObject() : stdClass
- Get resolved
Properties
$
public
string|null
$
zipcode The postal code
$
public
string|null
$
town The town name
$
public
string|null
$
phone The primary phone number
$
public
string|null
$
cell_phone The primary mobile phone number
$
public
string|null
$
email The primary email
$
public
string|null
$
name The contact person name
$
public
string|null
$
last_name The contact person last name
$
public
string|null
$
street The street and number
$
public
string|null
$
company The company name
$
public
string|null
$
salutation Salutation of contact person
$
public
array<string|int, mixed>|null
$
geo_location The geolocation array
Methods
__construct()
Construct a new address object
public
__construct([int|null $id = null ][, string|null $language = null ][, string $type = 'address' ]) : mixed
Parameters
- $id : int|null = null
-
A object id
- $language : string|null = null
-
The local language
- $type : string = 'address'
-
The child type when defined
Return values
mixed —ContactPerson()
Streamlined interface to get the contact person data
public
ContactPerson([string|null $key = null ]) : array<string|int, mixed>|string|null
Parameters
- $key : string|null = null
Return values
array<string|int, mixed>|string|null —Either a single part or a set of field when present
Country()
public
Country() : string|null
Return values
string|null —CountryCode()
public
CountryCode() : string|null
Return values
string|null —Data()
Direct get data method
public
Data([array<string|int, mixed>|null $data = null ]) : array<string|int, mixed>|null
Parameters
- $data : array<string|int, mixed>|null = null
Return values
array<string|int, mixed>|null —GeoCode()
Get go location information about this address
public
GeoCode() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|null —Id()
Get id of this address, is set as side effect of data setter
public
Id() : string|null
Return values
string|null —IsFilled()
Has minimal required data
public
IsFilled() : bool
Return values
bool —Is filled with enough data
Name()
Get the name
public
Name() : string
get a label in format of address [Company] | [Street], Zipcode Town
Return values
string —PhoneClear()
public
PhoneClear([string $prefix = '' ]) : string|null
Parameters
- $prefix : string = ''
Return values
string|null —RequireGeoCode()
Requires and can geo locate
public
RequireGeoCode() : bool
Return values
bool —Salutation()
Get salutation
public
Salutation([string|null $language = null ]) : string|stdClass|null
Get the translated salutation from this content type. Can be raw as well.
Parameters
- $language : string|null = null
-
Translate to this language
Return values
string|stdClass|null —The option value
SearchFields()
Get the list of searchable fields
public
SearchFields() : array<string|int, mixed>
Return values
array<string|int, mixed> —ToPlainObject()
Get resolved
public
ToPlainObject([ $language = null ][, $with_parent = true ]) : stdClass