setasign\SetaPDF2\Signer\Ocsp

Client Class representing an OCSP client.

File: /SetaPDF v2/Signer/Ocsp/Client.php
Old class name (alias): \SetaPDF_Signer_Ocsp_Client

Class hierarchy

Summary

Properties

$_curlOptions

protected array Client::$_curlOptions = array()

Additional curl options

$_lastResponse

protected array Client::$_lastResponse

The last response of the OCSP responder

$_logger


Methods

__construct()

public Client::__construct (
?string $url = null
)

The constructor.

Parameters
$url : ?string

The URL of the OCSP responder.

getCurlOption()

public Client::getCurlOption (
int $option
): ?string

Returns a defined cURL option or null if not set.

Parameters
$option : int

The CURLOPT_XXX option to set

getCurlOptions()

public Client::getCurlOptions (
void
): array

Get the cURL transfer options.

getHttpResolver()

Get the HttpResolver instance

Note that cURL options of this instance will be overwritten in the send() method and need to be defined by e.g. the setCurlOptions() method of this Client instance.

Also, the logger instance is set/synced/overwritten in send().

getLastResponse()

public Client::getLastResponse (
void
): array

Returns the last response of the OCSP responder.

getLogger()

Get the logger instance.

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

getUrl()

public Client::getUrl (
void
): ?string

Returns the URL of the OCSP responder.

send()

setCurlOption()

public Client::setCurlOption (
int|array $option,
?string $value = null
): void

Sets one or more cURL options with the assigned value.

Parameters
$option : int|array

The CURLOPT_XXX option to set

$value : ?string

The value to be set on option

See

setCurlOptions()

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

Set options for the cURL transfer.

Parameters
$curlOptions : array

The curl options.

See

setHttpResolver()

Set the HttpResolver instance

Parameters
$httpResolver : \SetaPDF_Signer_InformationResolver_HttpCurlResolver
 

setLogger()

setUrl()

public Client::setUrl (
string $url
): void

Sets the URL of the OCSP responder.

Parameters
$url : string

The url to the OCSP responder