Documentation

SimpleField extends BaseField
in package

A simple field with a scalar value.

Table of Contents

Properties

$confidence  : FieldConfidence|null
$locations  : array<string|int, FieldLocation>
$value  : string|float|bool|null
$indentLevel  : int

Methods

__construct()  : mixed
__toString()  : string
Base str-rep. Do not use.
createField()  : ListField|ObjectField|SimpleField
getBoolValue()  : bool|null
getFloatValue()  : float|null
getStringValue()  : string|null

Properties

$value

public string|float|bool|null $value

Value contained in the field.

Methods

__construct()

public __construct(array<string, int|float|string|bool|null|array<string|int, mixed>> $rawResponse[, int $indentLevel = 0 ]) : mixed
Parameters
$rawResponse : array<string, int|float|string|bool|null|array<string|int, mixed>>

Raw server response array.

$indentLevel : int = 0

Level of indentation for rst display.

__toString()

Base str-rep. Do not use.

public __toString() : string
Return values
string

String representation.

createField()

public static createField(array<string, int|float|string|bool|null|array<string|int, mixed>> $rawPrediction[, int $indentLevel = 0 ]) : ListField|ObjectField|SimpleField
Parameters
$rawPrediction : array<string, int|float|string|bool|null|array<string|int, mixed>>

Raw prediction array.

$indentLevel : int = 0

Level of indentation for rst display.

Tags
throws
MindeeApiException

Throws if the field type isn't recognized.

Return values
ListField|ObjectField|SimpleField

getBoolValue()

public getBoolValue() : bool|null
Return values
bool|null

Boolean representation of the field value.

getFloatValue()

public getFloatValue() : float|null
Return values
float|null

Float representation of the field value.

getStringValue()

public getStringValue() : string|null
Return values
string|null

String representation of the field value.

On this page

Search results