SetaPDF_Merger_Collection_Schema Class for handling data schemas in PDF Collections/Portfolios/Packages.

File: /SetaPDF v2/Merger/Collection/Schema.php

Class hierarchy

Summary

Constants

DATA_COMPRESSED_SIZE

public const string SetaPDF_Merger_Collection_Schema::DATA_COMPRESSED_SIZE = 'CompressedSize'

Constant defining the compressed size property

DATA_CREATION_DATE

public const string SetaPDF_Merger_Collection_Schema::DATA_CREATION_DATE = 'CreationDate'

Constant defining the creation date property

DATA_DESCRIPTION

Constant defining the description property

DATA_FILE_NAME

Constant defining the file name property

DATA_MODIFICATION_DATE

Constant defining the modification date property

DATA_SIZE

public const string SetaPDF_Merger_Collection_Schema::DATA_SIZE = 'Size'

Constant defining the size property

TYPE_DATE

public const string SetaPDF_Merger_Collection_Schema::TYPE_DATE = 'D'

Constant defining a date data type

TYPE_NUMBER

Constant defining a number type

TYPE_STRING

Constant defining a string data type (value needs to be in PdfDocEncoding or UTF-16BE)


Properties

$_collection


Methods

__construct()

The constructor.

Parameters
$collection : SetaPDF_Merger_Collection
 

addField()

public SetaPDF_Merger_Collection_Schema::addField (
string $name [, null|string|SetaPDF_Merger_Collection_Schema_Field $fieldOrFieldName = null [, null|string $dataType = null [, null|integer $order = null ]]]
): SetaPDF_Merger_Collection_Schema_Field

Add a field to the schema.

Parameters
$name : string

The internal field key name.

$fieldOrFieldName : null|string|SetaPDF_Merger_Collection_Schema_Field

The field name or an instance of a field.

$dataType : null|string

The data field or type. See class constants for possible values.

$order : null|integer

The relative order of the field name in the user interface. You should set this, otherwise you will get an unexpected result in different PDF viewers.

Exceptions

Throws SetaPDF_Core_SecHandler_Exception

Throws SetaPDF_Core_Type_Exception

See

addFields()

public SetaPDF_Merger_Collection_Schema::addFields (
array $fields
): void

Adds several fields to the schema.

Parameters
$fields : array

The keys are the internal field key name while the values are passed as additional parameter to the addField() method.

See

cleanUp()

Remove cycled references.

getCollection()

Get the collection instance.

getDictionary()

Get and/or create the schema dictionary.

Parameters
$create : bool
 
Exceptions

Throws SetaPDF_Core_SecHandler_Exception

Throws SetaPDF_Core_Type_Exception

getField()

Get a field instance by its name.

Parameters
$name : string
 
Exceptions

Throws SetaPDF_Core_SecHandler_Exception

Throws SetaPDF_Core_Type_Exception

hasField()

public SetaPDF_Merger_Collection_Schema::hasField (
string $name
): boolean

Check if a field exists.

Parameters
$name : string
 
Exceptions

Throws SetaPDF_Core_SecHandler_Exception

Throws SetaPDF_Core_Type_Exception

removeField()

public SetaPDF_Merger_Collection_Schema::removeField (
string $name
): boolean

Remove a field from the schema.

Parameters
$name : string