CropItem
in package
implements
Stringable
Result of a cropped document region.
Table of Contents
Interfaces
- Stringable
Properties
- $extractionResponse : ExtractionResponse|null
- $location : FieldLocation
- $objectType : string
Methods
- __construct() : mixed
- __toString() : string
- extractFromInputSource() : ExtractedImage
Properties
$extractionResponse
public
ExtractionResponse|null
$extractionResponse
The extraction response associated with the crop.
$location
public
FieldLocation
$location
Location which includes cropping coordinates for the detected object, within the source document.
$objectType
public
string
$objectType
Type or classification of the detected object.
Methods
__construct()
public
__construct(array<string, int|float|string|bool|null|array<string|int, mixed>> $rawResponse) : mixed
Parameters
- $rawResponse : array<string, int|float|string|bool|null|array<string|int, mixed>>
-
Raw server response array.
__toString()
public
__toString() : string
Return values
string —String representation.
extractFromInputSource()
public
extractFromInputSource(LocalInputSource $inputSource) : ExtractedImage
Parameters
- $inputSource : LocalInputSource
-
The input source from which to extract the crop.
Return values
ExtractedImage —The extracted image.