DateField
extends BaseField
in package
uses
FieldConfidenceMixin, FieldPositionMixin
A field containing a date value.
Table of Contents
Properties
- $boundingBox : Polygon|null
- $confidence : float
- $dateObject : DateTimeImmutable|null
- $isComputed : bool|null
- $pageId : int|mixed|null
- $polygon : Polygon
- $reconstructed : bool
- $value : string|null
Methods
- __compare() : bool
- Compares with the value of another field.
- __construct() : mixed
- __toString() : string
- setConfidence() : void
- Sets the confidence score.
- setPosition() : void
- Sets the position of a field.
Properties
$boundingBox
public
Polygon|null
$boundingBox
A right rectangle containing the word in the document.
$confidence
public
float
$confidence
The confidence score.
$dateObject
public
DateTimeImmutable|null
$dateObject
Date as a standard object.
$isComputed
public
bool|null
$isComputed
Whether the field was computed or retrieved directly from the document.
$pageId
public
int|mixed|null
$pageId
The document page on which the information was found.
$polygon
public
Polygon
$polygon
A polygon containing the word in the document.
$reconstructed
public
bool
$reconstructed
Whether the field was reconstructed from other fields.
$value
public
string|null
$value
The raw field value.
Methods
__compare()
Compares with the value of another field.
public
__compare(BaseField $obj) : bool
Parameters
- $obj : BaseField
-
Field to compare.
Return values
bool__construct()
public
__construct(array<string|int, mixed> $rawPrediction[, int|null $pageId = null ][, bool $reconstructed = false ][, string $valueKey = 'value' ]) : mixed
Parameters
- $rawPrediction : array<string|int, mixed>
-
Raw prediction array.
- $pageId : int|null = null
-
Page number for multi pages document.
- $reconstructed : bool = false
-
Whether the field was reconstructed.
- $valueKey : string = 'value'
-
Key to use for the value.
Tags
__toString()
public
__toString() : string
Return values
string —String representation.
setConfidence()
Sets the confidence score.
protected
setConfidence(array<string|int, mixed> $rawPrediction) : void
Parameters
- $rawPrediction : array<string|int, mixed>
-
Raw prediction array.
setPosition()
Sets the position of a field.
protected
setPosition(array<string|int, mixed> $rawPrediction) : void
Parameters
- $rawPrediction : array<string|int, mixed>
-
Raw prediction array.