phpDocumentor

CustomerGender
in package
implements CustomerGenderInterface

Value Object

Class CustomerGender

Represents a customer gender

Tags
category

System

subpackage

ValueObjects

implements

CustomerGenderInterface

Interfaces, Classes and Traits

CustomerGenderInterface
Value Object.

Table of Contents

$gender  : string
Customer's gender.
__construct()  : mixed
Constructor of the class CustomerGender.
__toString()  : string
Returns the equivalent string value.

Properties

Methods

__construct()

Constructor of the class CustomerGender.

public __construct(string $p_gender) : mixed

Validates the data type and the entered values of the customer gender.

Parameters
$p_gender : string

Customer's gender.

Tags
throws
InvalidArgumentException

If $p_gender is not a string.

throws
UnexpectedValueException

If $p_gender is not expected string "m" or "f".

Return values
mixed

__toString()

Returns the equivalent string value.

public __toString() : string
Return values
string

Equivalent string value.

Search results