Documentation

Address implements ArrayCopyable, Arrayable, Jsonable Uses ArrayTrait, JsonTrait

Address claim that represents a physical mailing address.

See "5.1.1. Address Claim" of OpenID Connect Core 1.0 for details.

Tags
see
https://openid.net/specs/openid-connect-core-1_0.html#AddressClaim

OpenID Connect Core 1.0, 5.1.1. Address Claim

Interfaces, Classes and Traits

ArrayCopyable
Interface to declare instances can be converted into/from arrays.
Arrayable
Interface to declare that instances can be converted into an array.
Jsonable
Interface to declare that instances can be converted into JSON strings.

Table of Contents

copyFromArray()  : mixed
Copy the content of the given array into this object.
copyToArray()  : mixed
Copy the content of this object into the given array.
fromArray()  : static
Convert an array into an instance of this class.
fromJson()  : static
Convert a JSON string into an instance of this class.
getCountry()  : string
Get the country name component.
getFormatted()  : string
Get the full mailing address, formatted for display or use on a mailing label.
getLocality()  : string
Get the city or locality component.
getPostalCode()  : string
Get the zip code or postal code component.
getRegion()  : string
Get the state, province, prefecture, or region component.
getStreetAddress()  : string
Get the full street address component, which MAY include house number, street name, Post Office Box, and multi-line extended street address information.
setCountry()  : Address
Set the country name component.
setFormatted()  : Address
Set the full mailing address, formatted for display or use on a mailing label.
setLocality()  : Address
Set the city or locality component.
setPostalCode()  : Address
Set the zip code or postal code component.
setRegion()  : Address
Set the state, province, prefecture, or region component.
setStreetAddress()  : Address
Set the full street address component, which MAY include house number, street name, Post Office Box, and multi-line extended street address information.
toArray()  : array<string|int, mixed>
Convert this object into an array.
toJson()  : string
Convert this object into a JSON string.

Methods

copyFromArray()

Copy the content of the given array into this object.

public copyFromArray(array<string|int, mixed> &$array) : mixed
Parameters
$array : array<string|int, mixed>
Return values
mixed

copyToArray()

Copy the content of this object into the given array.

public copyToArray(array<string|int, mixed> &$array) : mixed
Parameters
$array : array<string|int, mixed>
Return values
mixed

fromArray()

Convert an array into an instance of this class.

public static fromArray([array<string|int, mixed> $array = null ]) : static

This static function returns a new instance of this class. If $array is null, null is returned.

Parameters
$array : array<string|int, mixed> = null

An array

Return values
static

An instance of this class.

fromJson()

Convert a JSON string into an instance of this class.

public static fromJson(string $json) : static

This static function returns a new instance of this class. If $json is null or the type of $json is not string, null is returned.

Parameters
$json : string

A JSON string.

Return values
static

An instance of this class.

getCountry()

Get the country name component.

public getCountry() : string
Return values
string

The country name component.

getFormatted()

Get the full mailing address, formatted for display or use on a mailing label.

public getFormatted() : string
Return values
string

The full mailing address.

getLocality()

Get the city or locality component.

public getLocality() : string
Return values
string

The city or locality component.

getPostalCode()

Get the zip code or postal code component.

public getPostalCode() : string
Return values
string

The zip code or postal code component.

getRegion()

Get the state, province, prefecture, or region component.

public getRegion() : string
Return values
string

The state, province, prefecture, or region component.

getStreetAddress()

Get the full street address component, which MAY include house number, street name, Post Office Box, and multi-line extended street address information.

public getStreetAddress() : string
Return values
string

The full street address.

setCountry()

Set the country name component.

public setCountry(string $country) : Address
Parameters
$country : string

The country name component.

Return values
Address

$this object.

setFormatted()

Set the full mailing address, formatted for display or use on a mailing label.

public setFormatted(string $formatted) : Address
Parameters
$formatted : string

The full mailing address.

Return values
Address

$this object.

setLocality()

Set the city or locality component.

public setLocality(string $locality) : Address
Parameters
$locality : string

The city or locality component.

Return values
Address

$this object.

setPostalCode()

Set the zip code or postal code component.

public setPostalCode(string $postalCode) : Address
Parameters
$postalCode : string

The zip code or postal code component.

Return values
Address

$this object.

setRegion()

Set the state, province, prefecture, or region component.

public setRegion(string $region) : Address
Parameters
$region : string

The state, province, prefecture, or region component.

Return values
Address

$this object.

setStreetAddress()

Set the full street address component, which MAY include house number, street name, Post Office Box, and multi-line extended street address information.

public setStreetAddress(string $streetAddress) : Address
Parameters
$streetAddress : string

The full street address component.

Return values
Address

$this object.

toArray()

Convert this object into an array.

public toArray() : array<string|int, mixed>
Return values
array<string|int, mixed>

An array.

toJson()

Convert this object into a JSON string.

public toJson(int $options) : string
Parameters
$options : int

Options passed to json_encode(). This parameter is optional and its default value is 0.

Return values
string

A JSON string.

Search results