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.
$orientation
public
OrientationField
$orientation
Orientation of the page.
$prediction
public
Prediction
$prediction
Type of Page prediction.
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
__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