GeneratedObjectField
in package
A JSON-like object, with miscellaneous values.
Table of Contents
Properties
- $confidence : float|null
- $pageId : int|null
- $printableValues : array<string|int, mixed>
- $rawValue : string|null
Methods
- __construct() : mixed
- Constructor.
- __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
$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
$printableValues
private
array<string|int, mixed>
$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, mixed> $rawPrediction[, int|null $pageId = null ]) : mixed
Parameters
- $rawPrediction : array<string|int, mixed>
-
Raw prediction data.
- $pageId : int|null = null
-
ID of the page.
__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, mixed> $strDict) : bool
Parameters
- $strDict : 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.