Documentation

ObjectField extends BaseField
in package

A field containing a nested set of inference fields.

Table of Contents

Properties

$confidence  : FieldConfidence|null
$fields  : InferenceFields
$locations  : array<string|int, FieldLocation>
$indentLevel  : int

Methods

__construct()  : mixed
__toString()  : string
createField()  : ListField|ObjectField|SimpleField
getListField()  : ListField
Returns a ListField instance for the specified key.
getListFields()  : array<string|int, ListField>
Returns an array of ListField instances.
getObjectField()  : ObjectField
Returns an ObjectField instance for the specified key.
getObjectFields()  : array<string|int, ObjectField>
Returns an array of ObjectField instances.
getSimpleField()  : SimpleField
Returns a SimpleField instance for the specified key.
getSimpleFields()  : array<string|int, SimpleField>
Returns an array of SimpleField instances.
toStringFromList()  : string
Returns a string representation suitable for list display.

Properties

$indentLevel

protected int $indentLevel

Level of indentation for rst display.

Methods

__construct()

public __construct(array<string|int, mixed> $serverResponse[, int $indentLevel = 0 ]) : mixed
Parameters
$serverResponse : array<string|int, mixed>

Raw server response array.

$indentLevel : int = 0

Level of indentation for rst display.

__toString()

public __toString() : string
Return values
string

getListField()

Returns a ListField instance for the specified key.

public getListField(string $key) : ListField
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
ListField

getListFields()

Returns an array of ListField instances.

public getListFields() : array<string|int, ListField>
Tags
throws
InvalidArgumentException

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

Return values
array<string|int, ListField>

getObjectField()

Returns an ObjectField instance for the specified key.

public getObjectField(string $key) : ObjectField
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
ObjectField

getObjectFields()

Returns an array of ObjectField instances.

public getObjectFields() : array<string|int, ObjectField>
Tags
throws
InvalidArgumentException

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

Return values
array<string|int, ObjectField>

getSimpleField()

Returns a SimpleField instance for the specified key.

public getSimpleField(string $key) : SimpleField
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
SimpleField

getSimpleFields()

Returns an array of SimpleField instances.

public getSimpleFields() : array<string|int, SimpleField>
Tags
throws
InvalidArgumentException

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

Return values
array<string|int, SimpleField>

toStringFromList()

Returns a string representation suitable for list display.

public toStringFromList() : string
Return values
string

        
On this page

Search results