Documentation

Page
in package
implements Stringable

Base Page object for predictions.

Table of Contents

Interfaces

Stringable

Properties

$extras  : Extras
$id  : int
$orientation  : OrientationField
$prediction  : Prediction

Methods

__construct()  : mixed
__toString()  : string
createPrediction()  : Prediction

Properties

$extras

public Extras $extras

Potential Extras fields sent back along with the prediction.

$id

public int $id

ID of the current page.

Methods

__construct()

public __construct(string $predictionType, array<string, int|float|string|bool|null|array<string|int, mixed>> $rawPrediction) : mixed
Parameters
$predictionType : string

Type of prediction.

$rawPrediction : array<string, int|float|string|bool|null|array<string|int, mixed>>

Raw prediction array.

Tags
throws
MindeeApiException

Throws if the prediction type isn't recognized.

MindeeUnsetException

Throws if a field doesn't appear in the response, through the reflected document class.

__toString()

public __toString() : string
Return values
string

String representation.

createPrediction()

private static createPrediction(Prediction> $predictionType, array<string, int|float|string|bool|null|array<string|int, mixed>> $rawPrediction, int $pageId) : Prediction
Parameters
$predictionType : Prediction>

Type of prediction.

$rawPrediction : array<string, int|float|string|bool|null|array<string|int, mixed>>

Raw prediction array.

$pageId : int
Return values
Prediction
On this page

Search results