setasign\SetaPDF2\Core\Document\Catalog

Extensions Class for handling the catalogs extensions dictionary

File: /SetaPDF v2/Core/Document/Catalog/Extensions.php
Old class name (alias): \SetaPDF_Core_Document_Catalog_Extensions

Class hierarchy

Summary

Properties

$_catalog

The catalog instance


Methods

__construct()

The constructor.

Parameters
$catalog : \SetaPDF_Core_Document_Catalog
 

cleanUp()

public Extensions::cleanUp (
void
): void

Release memory and cycled references.

getDictionary()

public Extensions::getDictionary (
bool $create = false
): ?\SetaPDF_Core_Type_Dictionary

Get the extensions dictionary.

Parameters
$create : bool
 
Exceptions

Throws \setasign\SetaPDF2\Core\SecHandler\Exception

Throws \setasign\SetaPDF2\Core\Type\Exception

getExtension()

public Extensions::getExtension (
string $name
): array|bool

Get a developer extension by its name.

This method will return an array with the "baseVersion" and "extensionLevel" keys or false if no extension was found.

Parameters
$name : string
 
Exceptions

Throws \setasign\SetaPDF2\Core\SecHandler\Exception

Throws \setasign\SetaPDF2\Core\Type\Exception

getExtensions()

public Extensions::getExtensions (
void
): array

Get all defined developer extensions.

The method will return an array of the following structure: [$name => [baseVersion => "...", extensionLevel => "..."], ...]

Exceptions

Throws \setasign\SetaPDF2\Core\SecHandler\Exception

Throws \setasign\SetaPDF2\Core\Type\Exception

removeExtension()

public Extensions::removeExtension (
string $name
): bool

Removes a developer extension from the dictionary.

Parameters
$name : string
 
Exceptions

Throws \setasign\SetaPDF2\Core\SecHandler\Exception

Throws \setasign\SetaPDF2\Core\Type\Exception

setExtension()

public Extensions::setExtension (
string $name,
string $baseVersion,
int $extensionLevel
): void

Set the data of a developer extension.

Parameters
$name : string
 
$baseVersion : string
 
$extensionLevel : int
 
Exceptions

Throws \setasign\SetaPDF2\Core\SecHandler\Exception

Throws \setasign\SetaPDF2\Core\Type\Exception