Documentation

GeneratedObjectField
in package
implements Stringable

A JSON-like object, with miscellaneous values.

Table of Contents

Interfaces

Stringable

Properties

$bounding_box  : PositionField|null
$confidence  : float|null
$pageId  : int|null
$polygon  : PositionField|null
$quadrangle  : PositionField|null
$rectangle  : PositionField|null
$dynamicProperties  : array<string, BaseField<string|int, string|float|int|bool|Polygon>|int|float|string|bool|null>
$printableValues  : array<string|int, string>
$rawValue  : string|null

Methods

__construct()  : mixed
Constructor.
__get()  : mixed
Magic getter for dynamic properties.
__isset()  : bool
Magic isset for dynamic properties.
__set()  : void
Magic setter for dynamic properties.
__toString()  : string
Get a string representation of the object.
isGeneratedObject()  : bool
Checks whether a field is a custom object or not.
strLevel()  : string
ReSTructured-compliant string representation.

Properties

$dynamicProperties

private array<string, BaseField<string|int, string|float|int|bool|Polygon>|int|float|string|bool|null> $dynamicProperties = []

Storage for dynamically generated properties.

$printableValues

private array<string|int, string> $printableValues

List of all printable field names

$rawValue

private string|null $rawValue

Raw unprocessed value, as it was sent by the server

Methods

__construct()

Constructor.

public __construct(array<string, int|float|string|bool|null|array<string|int, mixed>> $rawPrediction[, int|null $pageId = null ]) : mixed
Parameters
$rawPrediction : array<string, int|float|string|bool|null|array<string|int, mixed>>

Raw prediction data.

$pageId : int|null = null

ID of the page.

__get()

Magic getter for dynamic properties.

public __get(string $name) : mixed
Parameters
$name : string

Property name.

__isset()

Magic isset for dynamic properties.

public __isset(string $name) : bool
Parameters
$name : string

Property name.

Return values
bool

__set()

Magic setter for dynamic properties.

public __set(string $name, BaseField<string|int, string|float|int|bool|Polygon>|string|int|bool|float|null $value) : void
Parameters
$name : string

Property name.

$value : BaseField<string|int, string|float|int|bool|Polygon>|string|int|bool|float|null

Property value.

__toString()

Get a string representation of the object.

public __toString() : string
Return values
string

String representation of the object.

isGeneratedObject()

Checks whether a field is a custom object or not.

public static isGeneratedObject(array<string, int|float|string|bool|null|array<string|int, mixed>> $strDict) : bool
Parameters
$strDict : array<string, int|float|string|bool|null|array<string|int, mixed>>

Input dictionary to check.

Return values
bool

Whether the field is a custom object.

strLevel()

ReSTructured-compliant string representation.

public strLevel([int $level = 0 ]) : string

Takes into account level of indentation & displays elements as list elements.

Parameters
$level : int = 0

Level of indentation (times 2 spaces).

Return values
string

ReSTructured-compliant string representation.

On this page

Search results