AnnotatedListField
extends AnnotatedBaseField
in package
A ListField with additional configuration for annotation.
Table of Contents
Properties
- $guidelines : string|null
- $items : array<string|int, AnnotatedSimpleField|AnnotatedObjectField|AnnotatedListField>
- $selected : bool
- $objectItemsCache : array<string|int, AnnotatedObjectField>|null
- $simpleItemsCache : array<string|int, AnnotatedSimpleField>|null
Methods
- __construct() : mixed
- createField() : AnnotatedSimpleField|AnnotatedObjectField|AnnotatedListField
- fromArray() : self
- getObjectItems() : array<string|int, AnnotatedObjectField>
- List of object fields.
- getSimpleItems() : array<string|int, AnnotatedSimpleField>
- List of simple fields.
- toArray() : array<string, mixed>
Properties
$guidelines
public
string|null
$guidelines
Guidelines or instructions for processing this field.
$items
public
array<string|int, AnnotatedSimpleField|AnnotatedObjectField|AnnotatedListField>
$items
= []
List of fields, prefer getSimpleItems() or getObjectItems().
$selected
public
bool
$selected
When true, use the RAG information for the final result. When false, use the Data Schema information.
$objectItemsCache
private
array<string|int, AnnotatedObjectField>|null
$objectItemsCache
= null
Cached list of object field items.
$simpleItemsCache
private
array<string|int, AnnotatedSimpleField>|null
$simpleItemsCache
= null
Cached list of simple field items.
Methods
__construct()
public
__construct(bool $selected, string|null $guidelines) : mixed
Parameters
- $selected : bool
- $guidelines : string|null
createField()
public
static createField(array<string, mixed> $rawResponse) : AnnotatedSimpleField|AnnotatedObjectField|AnnotatedListField
Parameters
- $rawResponse : array<string, mixed>
-
Raw server response array.
Tags
Return values
AnnotatedSimpleField|AnnotatedObjectField|AnnotatedListFieldfromArray()
public
static fromArray(array<string, mixed> $rawResponse) : self
Parameters
- $rawResponse : array<string, mixed>
-
Raw server response array.
Return values
selfgetObjectItems()
List of object fields.
public
getObjectItems() : array<string|int, AnnotatedObjectField>
Return values
array<string|int, AnnotatedObjectField>getSimpleItems()
List of simple fields.
public
getSimpleItems() : array<string|int, AnnotatedSimpleField>
Return values
array<string|int, AnnotatedSimpleField>toArray()
public
toArray() : array<string, mixed>
Return values
array<string, mixed> —Array representation for serialization.