phpDocumentor

CustomerPostcode
in package
implements CustomerPostcodeInterface Uses StringUtilityTrait

Value Object

Class CustomerPostcode

Represents a customer postcode

Tags
category

System

subpackage

ValueObjects

implements

CustomerPostcodeInterface

Interfaces, Classes and Traits

CustomerPostcodeInterface
Value Object.

Table of Contents

$postcode  : string
Customer's post code.
__construct()  : mixed
Constructor for the class CustomerPostcode.
__toString()  : string
Returns the equivalent string value.
strlenWrapper()  : mixed

Properties

Methods

__construct()

Constructor for the class CustomerPostcode.

public __construct(string $p_postcode) : mixed

Validates the length and the data type of the postcode.

Parameters
$p_postcode : string

Customer's post code.

Tags
throws
InvalidArgumentException

If $p_postcode is not a string.

throws
LengthException

If $p_postcode contains more characters than 10.

Return values
mixed

__toString()

Returns the equivalent string value.

public __toString() : string
Return values
string

Equivalent string value.

strlenWrapper()

protected strlenWrapper(mixed $string[, mixed $encoding = 'utf-8' ]) : mixed
Parameters
$string : mixed
$encoding : mixed = 'utf-8'
Return values
mixed

Search results