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
$bounding_box
public
PositionField|null
$bounding_box
$confidence
public
float|null
$confidence
Confidence with which the value was assessed
$pageId
public
int|null
$pageId
ID of the page the object was found on
$polygon
public
PositionField|null
$polygon
$quadrangle
public
PositionField|null
$quadrangle
$rectangle
public
PositionField|null
$rectangle
$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
__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.