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
$confidence
public
FieldConfidence|null
$confidence
Confidence score for the field.
$locations
public
array<string|int, FieldLocation>
$locations
List of possible locations for a field.
$value
public
string|float|bool|null
$value
Value contained in the field.
$indentLevel
protected
int
$indentLevel
= 0
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
Return values
ListField|ObjectField|SimpleFieldgetBoolValue()
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.