Documentation

Name extends RosetteParamsSetBase
in package

Class that represents a Name.

Table of Contents

Properties

$entityType  : string
Entity type of the name.
$gender  : Gender
Gender of the name. Can be MALE, FEMALE and NONBINARY
$language  : string
Language of the name.
$script  : string
Script in which the name is written.
$text  : string
Textual form of the name.

Methods

__construct()  : mixed
Constructor.
get()  : mixed
Gets a property value based on the property name.
getMultiPartContent()  : string
Provides default multiPart call for child classes that don't implement it
serialize()  : string
Serialize into a json string.
set()  : mixed
Sets a property based on the name.
validate()  : mixed
required validate function
removeEmptyProperties()  : mixed
Recursively removes empty properties to facilitate json encoding.

Properties

$entityType

Entity type of the name.

public string $entityType

$gender

Gender of the name. Can be MALE, FEMALE and NONBINARY

public Gender $gender

$language

Language of the name.

public string $language

$script

Script in which the name is written.

public string $script

$text

Textual form of the name.

public string $text

Methods

__construct()

Constructor.

public __construct(mixed $text[, mixed $entityType = null ][, mixed $language = null ][, mixed $script = null ][, mixed $gender = null ]) : mixed
Parameters
$text : mixed
$entityType : mixed = null
$language : mixed = null
$script : mixed = null
$gender : mixed = null
Tags
throws
RosetteException

get()

Gets a property value based on the property name.

public get(string $propertyName) : mixed
Parameters
$propertyName : string

the name of the property

Tags
throws
RosetteException

if property name not found

Return values
mixed

property value

getMultiPartContent()

Provides default multiPart call for child classes that don't implement it

public getMultiPartContent() : string
Return values
string

serialize()

Serialize into a json string.

public serialize(mixed $options) : string
Parameters
$options : mixed

associative array of options

Return values
string

set()

Sets a property based on the name.

public set(string $propertyName, mixed $value) : mixed
Parameters
$propertyName : string

the name of the property

$value : mixed

the value to set

validate()

required validate function

public validate() : mixed

removeEmptyProperties()

Recursively removes empty properties to facilitate json encoding.

private removeEmptyProperties(mixed $obj) : mixed
Parameters
$obj : mixed

Object to clean


        
On this page

Search results