setasign\SetaPDF2\Signer\InformationResolver

HttpCurlResolver Resolver for HTTP(s) using CURL functions.

File: /SetaPDF v2/Signer/InformationResolver/HttpCurlResolver.php
Old class name (alias): \SetaPDF_Signer_InformationResolver_HttpCurlResolver

Class hierarchy

Implements

Summary

Properties

$_curlOptions

protected array HttpCurlResolver::$_curlOptions = array()

Curl options.

$_maxTries

protected int HttpCurlResolver::$_maxTries = 5

The maximum count of how many tries the resolver does on error.

$_sleeptimeAfterFailure

Defines how long the process sleeps until the next try on error in microseconds.


Methods

__construct()

public HttpCurlResolver::__construct (
array $curlOptions = array ( )
)

The constructor.

Parameters
$curlOptions : array

See https://www.php.net/curl-setopt

accepts()

public HttpCurlResolver::accepts (
string $uri
): bool
Parameters
$uri : string
 

getCurlOptions()

public HttpCurlResolver::getCurlOptions (
void
): array

Get the cURL transfer options.

getLogger()

Get the logger instance.

If no logger instance was passed before a new instance of \setasign\SetaPDF2\Signer\ValidationRelatedInfo\Logger is returned.

getMaxTries()

public HttpCurlResolver::getMaxTries (
void
): int

getSleeptimeAfterFailure()

resolve()

public HttpCurlResolver::resolve (
string $uri = null
): array
Parameters
$uri : string
 
Return Values

An array where index 0 is the content-type and 1 is the content itself.

Exceptions

Throws \setasign\SetaPDF2\Signer\Exception

setCurlOptions()

public HttpCurlResolver::setCurlOptions (
array $curlOptions
): void

Set options for the cURL transfer.

Parameters
$curlOptions : array

The curl options.

See

setMaxTries()

public HttpCurlResolver::setMaxTries (
int $maxTries
): void
Parameters
$maxTries : int
 

setSleeptimeAfterFailure()

public HttpCurlResolver::setSleeptimeAfterFailure (
int $sleeptimeAfterFailure
): void
Parameters
$sleeptimeAfterFailure : int