NameTranslationParameters
extends RosetteParamsSetBase
in package
Class NameTranslationParameters.
Table of Contents
Properties
- $entityType : string
- $genre : string
- $name : string
- $sourceLanguageOfOrigin : string
- $sourceLanguageOfUse : string
- $sourceScript : string
- $targetLanguage : string
- $targetScheme : string
- $targetScript : string
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
- Validates parameters.
- removeEmptyProperties() : mixed
- Recursively removes empty properties to facilitate json encoding.
Properties
$entityType
public
string
$entityType
entityType type of entity, e.g. PERSON, LOCATION, ORGANIZATION (optional)
$genre
public
string
$genre
genre to categorize the input data
$name
public
string
$name
name to translate
$sourceLanguageOfOrigin
public
string
$sourceLanguageOfOrigin
sourceLanguageOfOrigin ISO 693-3 code for name's language of origin (optional)
$sourceLanguageOfUse
public
string
$sourceLanguageOfUse
sourceLanguageOfUse ISO 693-3 code for name's language of use (optional)
$sourceScript
public
string
$sourceScript
sourceScript ISO 15924 code for name's script (optional)
$targetLanguage
public
string
$targetLanguage
targetLanguage ISO 639-3 code for the translation language
$targetScheme
public
string
$targetScheme
targetScheme transliteration scheme for the translation (optional)
$targetScript
public
string
$targetScript
targetScript ISO 15924 code for name's script (optional)
Methods
__construct()
constructor.
public
__construct() : mixed
get()
Gets a property value based on the property name.
public
get(string $propertyName) : mixed
Parameters
- $propertyName : string
-
the name of the property
Tags
Return values
mixed —property value
getMultiPartContent()
Provides default multiPart call for child classes that don't implement it
public
getMultiPartContent() : string
Return values
stringserialize()
Serialize into a json string.
public
serialize(mixed $options) : string
Parameters
- $options : mixed
-
associative array of options
Return values
stringset()
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()
Validates parameters.
public
validate() : mixed
Tags
removeEmptyProperties()
Recursively removes empty properties to facilitate json encoding.
private
removeEmptyProperties(mixed $obj) : mixed
Parameters
- $obj : mixed
-
Object to clean