AddressField
extends StringField
in package
A field representing an address.
Table of Contents
Properties
- $addressComplement : string|null
- $boundingBox : Polygon|null
- $city : string|null
- $confidence : float
- $country : string|null
- $pageId : int|mixed|null
- $poBox : string|null
- $polygon : Polygon
- $postalCode : string|null
- $rawValue : string|null
- $reconstructed : bool
- $state : string|null
- $streetName : string|null
- $streetNumber : string|null
- $value : string|null
Methods
- __compare() : bool
- Compares with the value of another field.
- __construct() : mixed
- __toString() : string
- Prettier string representation (same semantics as StringField).
- setConfidence() : void
- Sets the confidence score.
- setPosition() : void
- Sets the position of a field.
Properties
$addressComplement
public
string|null
$addressComplement
Additional address complement.
$boundingBox
public
Polygon|null
$boundingBox
A right rectangle containing the word in the document.
$city
public
string|null
$city
City or locality.
$confidence
public
float
$confidence
The confidence score.
$country
public
string|null
$country
Country.
$pageId
public
int|mixed|null
$pageId
The document page on which the information was found.
$poBox
public
string|null
$poBox
PO-box number.
$polygon
public
Polygon
$polygon
A polygon containing the word in the document.
$postalCode
public
string|null
$postalCode
Postal / ZIP code.
$rawValue
public
string|null
$rawValue
The value as it appears on the document.
$reconstructed
public
bool
$reconstructed
Whether the field was reconstructed from other fields.
$state
public
string|null
$state
State, province or region.
$streetName
public
string|null
$streetName
Street name.
$streetNumber
public
string|null
$streetNumber
Street number.
$value
public
string|null
$value
Value as string.
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 as returned by the Mindee API.
- $pageId : int|null = null
-
Page number for multi-page documents.
- $reconstructed : bool = false
-
Whether the field was reconstructed.
- $valueKey : string = 'value'
-
Key to use for the full address value.
__toString()
Prettier string representation (same semantics as StringField).
public
__toString() : string
Return values
stringsetConfidence()
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.