CustomerPostcode

Implements \CustomerPostcodeInterface

Value Object

Class CustomerPostcode

Represents a customer postcode

category

System

package

Customer

subpackage

ValueObjects

implements

CustomerPostcodeInterface

Methods

Constructor for the class CustomerPostcode.

__construct(string $p_postcode) 

Validates the length and the data type of the postcode.

Throws
\InvalidArgumentException

If $p_postcode is not a string.

\LengthException

If $p_postcode contains more characters than 10.

Arguments

$p_postcode

string

Customer's post code.

Returns the equivalent string value.

__toString() : string

Response

string

Equivalent string value.

Properties