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
$fields
public
AnnotatedFields
$fields
Sub-fields of the field.
$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
__construct()
public
__construct(bool $selected, string|null $guidelines, AnnotatedFields $fields) : mixed
Parameters
- $selected : bool
- $guidelines : string|null
- $fields : AnnotatedFields
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
selfgetListField()
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
Return values
AnnotatedListFieldgetListFields()
Returns an array of all AnnotatedListField instances in this object's fields.
public
getListFields() : array<string|int, AnnotatedListField>
Return values
array<string|int, 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
Return values
selfgetObjectFields()
Returns an array of all AnnotatedObjectField instances in this object's fields.
public
getObjectFields() : array<string|int, AnnotatedObjectField>
Return values
array<string|int, AnnotatedObjectField>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
Return values
AnnotatedSimpleFieldgetSimpleFields()
Returns an array of all AnnotatedSimpleField instances in this object's fields.
public
getSimpleFields() : 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.