Documentation

AnnotatedFields extends ArrayObject
in package

A dictionary of field names and their corresponding annotation.

Tags
extends

Table of Contents

Properties

$fields  : array<string, AnnotatedSimpleField|AnnotatedObjectField|AnnotatedListField>

Methods

__construct()  : mixed
get()  : AnnotatedSimpleField|AnnotatedObjectField|AnnotatedListField
Get a field by key.
getListField()  : AnnotatedListField
Get a list field by key.
getObjectField()  : AnnotatedObjectField
Get an object field by key.
getSimpleField()  : AnnotatedSimpleField
Get a simple field by key.
toArray()  : array<string, mixed>

Properties

Methods

__construct()

public __construct(array<string, array<string, mixed>> $rawResponse) : mixed
Parameters
$rawResponse : array<string, array<string, mixed>>

Raw server response array.

getListField()

Get a list field by key.

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

Field key to retrieve.

Tags
throws
InvalidArgumentException

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

Return values
AnnotatedListField

getObjectField()

Get an object field by key.

public getObjectField(string $fieldName) : AnnotatedObjectField
Parameters
$fieldName : string

Field key to retrieve.

Tags
throws
InvalidArgumentException

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

Return values
AnnotatedObjectField

getSimpleField()

Get a simple field by key.

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

Field key 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