CustomerGender

Implements \CustomerGenderInterface

Value Object

Class CustomerGender

Represents a customer gender

category

System

package

Customer

subpackage

ValueObjects

implements

CustomerGenderInterface

Methods

Constructor of the class CustomerGender.

__construct(string $p_gender) 

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

Throws
\InvalidArgumentException

If $p_gender is not a string.

\UnexpectedValueException

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

Arguments

$p_gender

string

Customer's gender.

Returns the equivalent string value.

__toString() : string

Response

string

Equivalent string value.

Properties

Customer's gender.

gender : string
var

Type(s)

string