phpDocumentor

CustomerVatNumber
in package
implements CustomerVatNumberInterface Uses StringUtilityTrait

Value Object

Class CustomerVatNumber

Represents a tax ID number (VATIN)

Tags
category

System

subpackage

ValueObjects

implements

CustomerVatNumberInterface

Interfaces, Classes and Traits

CustomerVatNumberInterface
Value Object.

Table of Contents

$vatNumber  : string
Customer's VAT number.
__construct()  : mixed
Constructor of the class CustomerVatNumber.
__toString()  : string
Returns the equivalent string value.
strlenWrapper()  : mixed

Properties

Methods

__construct()

Constructor of the class CustomerVatNumber.

public __construct(string $p_vatNumber) : mixed

Validates the length and the data type of the customer VAT number.

Parameters
$p_vatNumber : string

Customer's VAT number.

Tags
throws
InvalidArgumentException

If $p_vatNumber is not a string.

throws
LengthException

If $p_vatNumber contains more characters than 20.

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