ObjectField
extends BaseField
in package
A field containing a nested set of inference fields.
Table of Contents
Properties
- $confidence : FieldConfidence|null
- $fields : InferenceFields
- $locations : array<string|int, FieldLocation>
- $indentLevel : int
Methods
- __construct() : mixed
- __toString() : string
- createField() : ListField|ObjectField|SimpleField
- getListField() : ListField
- Returns a ListField instance for the specified key.
- getListFields() : array<string|int, ListField>
- Returns an array of ListField instances.
- getObjectField() : ObjectField
- Returns an ObjectField instance for the specified key.
- getObjectFields() : array<string|int, ObjectField>
- Returns an array of ObjectField instances.
- getSimpleField() : SimpleField
- Returns a SimpleField instance for the specified key.
- getSimpleFields() : array<string|int, SimpleField>
- Returns an array of SimpleField instances.
- toStringFromList() : string
- Returns a string representation suitable for list display.
Properties
$confidence
public
FieldConfidence|null
$confidence
Confidence score for the field.
$fields
public
InferenceFields
$fields
$locations
public
array<string|int, FieldLocation>
$locations
List of possible locations for a field.
$indentLevel
protected
int
$indentLevel
Level of indentation for rst display.
Methods
__construct()
public
__construct(array<string|int, mixed> $serverResponse[, int $indentLevel = 0 ]) : mixed
Parameters
- $serverResponse : array<string|int, mixed>
-
Raw server response array.
- $indentLevel : int = 0
-
Level of indentation for rst display.
__toString()
public
__toString() : string
Return values
stringcreateField()
public
static createField(array<string|int, mixed> $rawPrediction[, int $indentLevel = 0 ]) : ListField|ObjectField|SimpleField
Parameters
- $rawPrediction : array<string|int, mixed>
-
Raw prediction array.
- $indentLevel : int = 0
-
Level of indentation for rst display.
Tags
Return values
ListField|ObjectField|SimpleFieldgetListField()
Returns a ListField instance for the specified key.
public
getListField(string $key) : ListField
Parameters
- $key : string
-
The key of the list field to retrieve.
Tags
Return values
ListFieldgetListFields()
Returns an array of ListField instances.
public
getListFields() : array<string|int, ListField>
Tags
Return values
array<string|int, ListField>getObjectField()
Returns an ObjectField instance for the specified key.
public
getObjectField(string $key) : ObjectField
Parameters
- $key : string
-
The key of the simple field to retrieve.
Tags
Return values
ObjectFieldgetObjectFields()
Returns an array of ObjectField instances.
public
getObjectFields() : array<string|int, ObjectField>
Tags
Return values
array<string|int, ObjectField>getSimpleField()
Returns a SimpleField instance for the specified key.
public
getSimpleField(string $key) : SimpleField
Parameters
- $key : string
-
The key of the simple field to retrieve.
Tags
Return values
SimpleFieldgetSimpleFields()
Returns an array of SimpleField instances.
public
getSimpleFields() : array<string|int, SimpleField>
Tags
Return values
array<string|int, SimpleField>toStringFromList()
Returns a string representation suitable for list display.
public
toStringFromList() : string