CustomerCountryIso2

Implements \CustomerCountryIso2Interface

Value Object

Class CustomerCountryIso2

Represents a customer country ISO2 code

category

System

package

Customer

subpackage

ValueObjects

implements

CustomerCountryIso2Interface

Methods

Constructor of the class CustomerCountryIso2.

__construct(string $p_iso2) 

Validates the length and data type of the customer country ISO-2 code.

Throws
\InvalidArgumentException

If $p_iso2 is not a string.

\LengthException

If $p_iso2 contains more characters than 2.

Arguments

$p_iso2

string

Customer's ISO-2 country code.

Returns the equivalent string value.

__toString() : string

Response

string

Equivalent string value.

strlenWrapper

strlenWrapper( $string,  $encoding = 'utf-8') 
inherited

Arguments

$string

$encoding

Properties

Customer's ISO-2 country code.

iso2 : string
var

Type(s)

string