Endpoint
extends BaseEndpoint
in package
Endpoint management.
Table of Contents
Properties
Methods
- __construct() : mixed
- documentQueueReqGet() : array<string|int, mixed>
- Retrieves a document from its queue ID.
- predictAsyncRequestPost() : array<string|int, mixed>
- Sends a document for synchronous enqueuing.
- predictRequestPost() : array<string|int, mixed>
- Sends a document for asynchronous enqueuing.
- setFinalCurlOpts() : array<string|int, mixed>
- initCurlSessionGet() : array<string|int, mixed>
- Starts a CURL session, using GET.
- initCurlSessionPost() : array<string|int, mixed>
- Starts a CURL session, using POST.
Properties
$owner
public
string
$owner
Name of the endpoint's owner.
$settings
public
MindeeApi|MindeeWorkflowApi
$settings
Settings of the endpoint.
$urlName
public
string
$urlName
Url (name) of then endpoint.
$version
public
string
$version
Version of the endpoint.
Methods
__construct()
public
__construct(string $urlName, string $owner, string $version, MindeeApi $settings) : mixed
Parameters
- $urlName : string
-
Url (name) of the endpoint.
- $owner : string
-
Name of the endpoint's owner.
- $version : string
-
Version of the endpoint.
- $settings : MindeeApi
-
Settings for the endpoint.
documentQueueReqGet()
Retrieves a document from its queue ID.
public
documentQueueReqGet(string $queueId) : array<string|int, mixed>
Parameters
- $queueId : string
-
ID of the queue to poll.
Return values
array<string|int, mixed>predictAsyncRequestPost()
Sends a document for synchronous enqueuing.
public
predictAsyncRequestPost(InputSource $fileCurl, bool $includeWords, bool $fullText, bool $closeFile, bool $cropper) : array<string|int, mixed>
Parameters
- $fileCurl : InputSource
-
File to upload.
- $includeWords : bool
-
Whether to include the full text for each page. This performs a full OCR operation on the server and will increase response time.
- $fullText : bool
-
Whether to include the full OCR text response in compatible APIs. This performs a full OCR operation on the server and may increase response time.
- $closeFile : bool
-
Whether to close the file after parsing it.
- $cropper : bool
-
Whether to include cropper results for each page. This performs a cropping operation on the server and will increase response time.
Return values
array<string|int, mixed>predictRequestPost()
Sends a document for asynchronous enqueuing.
public
predictRequestPost(InputSource $fileCurl, bool $includeWords, bool $fullText, bool $closeFile, bool $cropper) : array<string|int, mixed>
Parameters
- $fileCurl : InputSource
-
File to upload.
- $includeWords : bool
-
Whether to include the full text for each page. This performs a full OCR operation on the server and will increase response time.
- $fullText : bool
-
Whether to include the full OCR text response in compatible APIs. This performs a full OCR operation on the server and may increase response time.
- $closeFile : bool
-
Whether to close the file after parsing it.
- $cropper : bool
-
Whether to include cropper results for each page. This performs a cropping operation on the server and will increase response time.
Return values
array<string|int, mixed>setFinalCurlOpts()
public
setFinalCurlOpts(resource $ch, string $suffix, array<string|int, mixed>|null $postFields) : array<string|int, mixed>
Parameters
- $ch : resource
-
Curl Channel.
- $suffix : string
-
Optional suffix for the url call.
- $postFields : array<string|int, mixed>|null
-
Post fields.
Return values
array<string|int, mixed>initCurlSessionGet()
Starts a CURL session, using GET.
protected
initCurlSessionGet(string $queueId) : array<string|int, mixed>
Parameters
- $queueId : string
-
ID of the queue to poll.
Return values
array<string|int, mixed>initCurlSessionPost()
Starts a CURL session, using POST.
private
initCurlSessionPost(InputSource $fileCurl, bool $includeWords, bool $fullText, bool $cropper, bool $async, bool $closeFile) : array<string|int, mixed>
Parameters
- $fileCurl : InputSource
-
File to upload.
- $includeWords : bool
-
Whether to include the full text for each page. This performs a full OCR operation on the server and will increase response time.
- $fullText : bool
-
Whether to include the full OCR text response in compatible APIs. This performs a full OCR operation on the server and may increase response time.
- $cropper : bool
-
Whether to include cropper results for each page. This performs a cropping operation on the server and will increase response time.
- $async : bool
-
Whether the query is in async mode.
- $closeFile : bool
-
Close file.