Documentation

AnnotatedObjectField extends AnnotatedBaseField
in package

An ObjectField with additional configuration for annotation.

Table of Contents

Properties

$fields  : AnnotatedFields
$guidelines  : string|null
$selected  : bool

Methods

__construct()  : mixed
createField()  : AnnotatedSimpleField|AnnotatedObjectField|AnnotatedListField
fromArray()  : self
getListField()  : AnnotatedListField
Returns an AnnotatedListField instance for the specified key.
getListFields()  : array<string|int, AnnotatedListField>
Returns an array of all AnnotatedListField instances in this object's fields.
getObjectField()  : self
Returns an AnnotatedObjectField instance for the specified key.
getObjectFields()  : array<string|int, AnnotatedObjectField>
Returns an array of all AnnotatedObjectField instances in this object's fields.
getSimpleField()  : AnnotatedSimpleField
Returns an AnnotatedSimpleField instance for the specified key.
getSimpleFields()  : array<string|int, AnnotatedSimpleField>
Returns an array of all AnnotatedSimpleField instances in this object's fields.
toArray()  : array<string, mixed>

Properties

$guidelines

public string|null $guidelines

Guidelines or instructions for processing this field.

$selected

public bool $selected

When true, use the RAG information for the final result. When false, use the Data Schema information.

Methods

fromArray()

public static fromArray(array<string, mixed> $rawResponse) : self
Parameters
$rawResponse : array<string, mixed>

Raw server response array.

Return values
self

getListField()

Returns an AnnotatedListField instance for the specified key.

public getListField(string $key) : AnnotatedListField
Parameters
$key : string

The key of the list field to retrieve.

Tags
throws
InvalidArgumentException

When the field does not exist or is not a list field.

Return values
AnnotatedListField

getObjectField()

Returns an AnnotatedObjectField instance for the specified key.

public getObjectField(string $key) : self
Parameters
$key : string

The key of the object field to retrieve.

Tags
throws
InvalidArgumentException

When the field does not exist or is not an object field.

Return values
self

getSimpleField()

Returns an AnnotatedSimpleField instance for the specified key.

public getSimpleField(string $key) : AnnotatedSimpleField
Parameters
$key : string

The key of the simple field to retrieve.

Tags
throws
InvalidArgumentException

When the field does not exist or is not a simple field.

Return values
AnnotatedSimpleField

toArray()

public toArray() : array<string, mixed>
Return values
array<string, mixed>

Array representation for serialization.

On this page

Search results