Skip to content

Name

Properties

firstName

protected \Qubus\ValueObjects\StringLiteral\StringLiteral $firstName

middleName

protected \Qubus\ValueObjects\StringLiteral\StringLiteral $middleName

lastName

protected \Qubus\ValueObjects\StringLiteral\StringLiteral $lastName

Methods

__construct

Returns a Name object.

public __construct(\Qubus\ValueObjects\StringLiteral\StringLiteral $firstName, \Qubus\ValueObjects\StringLiteral\StringLiteral $middleName, \Qubus\ValueObjects\StringLiteral\StringLiteral $lastName): mixed

Parameters:

Parameter Type Description
$firstName \Qubus\ValueObjects\StringLiteral\StringLiteral
$middleName \Qubus\ValueObjects\StringLiteral\StringLiteral
$lastName \Qubus\ValueObjects\StringLiteral\StringLiteral

__toString

Returns the full name.

public __toString(): string

Throws:


fromNative

Returns a Name objects form PHP native values.

public static fromNative(): \Qubus\ValueObjects\Person\Name|\Qubus\ValueObjects\ValueObject
  • This method is static.

Throws:


getFirstName

Returns the first name.

public getFirstName(): \Qubus\ValueObjects\StringLiteral\StringLiteral

getMiddleName

Returns the middle name.

public getMiddleName(): \Qubus\ValueObjects\StringLiteral\StringLiteral

getLastName

Returns the last name.

public getLastName(): \Qubus\ValueObjects\StringLiteral\StringLiteral

getFullName

Returns the full name.

public getFullName(): \Qubus\ValueObjects\StringLiteral\StringLiteral

Throws:


equals

Tells whether two names are equal by comparing their values.

public equals(\Qubus\ValueObjects\Person\Name|\Qubus\ValueObjects\ValueObject $name): bool

Parameters:

Parameter Type Description
$name \Qubus\ValueObjects\Person\Name|\Qubus\ValueObjects\ValueObject

Throws:



Automatically generated on 2025-10-13