Config

Immutable signature configuration value object. Captures the signing profile, digest algorithm, and certification level, and derives the PDF /SubFilter from the selected profile.

Namespace: Com\Tecnick\Pdf\Sign

Final: Yes

File: Config.php line 36

Immutable signature configuration value object. Captures the signing profile, digest algorithm, and certification level, and derives the PDF /SubFilter from the selected profile.

Tags

Constants

DIGEST_ALGORITHMS

File: Config.php line 86

public array<int, string> DIGEST_ALGORITHMS = [\Com\Tecnick\Pdf\Sign\DigestAlgorithm::Sha256->value, \Com\Tecnick\Pdf\Sign\DigestAlgorithm::Sha384->value, \Com\Tecnick\Pdf\Sign\DigestAlgorithm::Sha512->value]

Derived from DigestAlgorithm, as PROFILES is from SignatureProfile.

PROFILE_LEGACY

File: Config.php line 41

public mixed PROFILE_LEGACY = \Com\Tecnick\Pdf\Sign\SignatureProfile::Legacy->value

PROFILE_PADES_B_B

File: Config.php line 46

public mixed PROFILE_PADES_B_B = \Com\Tecnick\Pdf\Sign\SignatureProfile::PadesBB->value

PROFILE_PADES_B_LT

File: Config.php line 56

public mixed PROFILE_PADES_B_LT = \Com\Tecnick\Pdf\Sign\SignatureProfile::PadesBLT->value

PROFILE_PADES_B_LTA

File: Config.php line 61

public mixed PROFILE_PADES_B_LTA = \Com\Tecnick\Pdf\Sign\SignatureProfile::PadesBLTA->value

PROFILE_PADES_B_T

File: Config.php line 51

public mixed PROFILE_PADES_B_T = \Com\Tecnick\Pdf\Sign\SignatureProfile::PadesBT->value

PROFILES

File: Config.php line 71

public array<int, string> PROFILES = [\Com\Tecnick\Pdf\Sign\SignatureProfile::Legacy->value, \Com\Tecnick\Pdf\Sign\SignatureProfile::PadesBB->value, \Com\Tecnick\Pdf\Sign\SignatureProfile::PadesBT->value, \Com\Tecnick\Pdf\Sign\SignatureProfile::PadesBLT->value, \Com\Tecnick\Pdf\Sign\SignatureProfile::PadesBLTA->value]

Derived from SignatureProfile, which is the closed set the constructor enforces.

Properties

$certType read-only

File: Config.php line 116

public int $certType = 2

$digestAlgorithm read-only

File: Config.php line 100

public string $digestAlgorithm

$profile read-only

File: Config.php line 95

public string $profile

Methods

__construct()

File: Config.php line 113

public __construct([string|SignatureProfile $profile = self::PROFILE_LEGACY ][, string|DigestAlgorithm $digestAlgorithm = 'sha256' ][, int $certType = 2 ]) : mixed

Parameters

  • $profile : string|SignatureProfile = self::PROFILE_LEGACY: Profile identifier or enum case.
  • $digestAlgorithm : string|DigestAlgorithm = ‘sha256’: Digest algorithm name or enum case.
  • $certType : int = 2: Certification level (DocMDP P value): 0 = approval/UR signature, 1 = no changes permitted, 2 = form fill-in and signing permitted, 3 = as 2 plus annotation changes.

Tags

fromArray()

File: Config.php line 154

public static fromArray(array<string, mixed> $data) : self

Parameters

  • $data : array<string, mixed>: Signature options.

Tags

  • throws: Exception If any option is present but of the wrong type or value.

Return values

self

isPades()

File: Config.php line 134

public isPades() : bool

Return values

bool

subFilter()

File: Config.php line 142

public subFilter() : string

Return values

string