ListField
extends BaseField
in package
A field containing a list of other fields.
Table of Contents
Properties
- $confidence : FieldConfidence|null
- $items : array<string|int, SimpleField|ObjectField|ListField>
- $locations : array<string|int, FieldLocation>
- $indentLevel : int
- $objectItemsCache : array<string|int, ObjectField>|null
- $simpleItemsCache : array<string|int, SimpleField>|null
Methods
- __construct() : mixed
- __toString() : string
- Base str-rep. Do not use.
- createField() : ListField|ObjectField|SimpleField
- getObjectItems() : array<string|int, ObjectField>
- List of object fields.
- getSimpleItems() : array<string|int, SimpleField>
- List of simple fields.
Properties
$confidence
public
FieldConfidence|null
$confidence
Confidence score for the field.
$items
public
array<string|int, SimpleField|ObjectField|ListField>
$items
Items contained in the list, prefer getSimpleItems() or getObjectItems().
$locations
public
array<string|int, FieldLocation>
$locations
List of possible locations for a field.
$indentLevel
protected
int
$indentLevel
= 0
$objectItemsCache
private
array<string|int, ObjectField>|null
$objectItemsCache
= null
Cached list of object field items.
$simpleItemsCache
private
array<string|int, SimpleField>|null
$simpleItemsCache
= null
Cached list of simple field items.
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.
Tags
__toString()
Base str-rep. Do not use.
public
__toString() : string
Return values
stringcreateField()
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|SimpleFieldgetObjectItems()
List of object fields.
public
getObjectItems() : array<string|int, ObjectField>
Return values
array<string|int, ObjectField>getSimpleItems()
List of simple fields.
public
getSimpleItems() : array<string|int, SimpleField>