setasign\SetaPDF2\Merger\Collection
Schema Class for handling data schemas in PDF Collections/Portfolios/Packages.
File: /SetaPDF v2/Merger/Collection/Schema.php
Old class name (alias):
\SetaPDF_Merger_Collection_Schema
Class hierarchy
Summary
Constants
DATA_COMPRESSED_SIZE
Constant defining the compressed size property
DATA_CREATION_DATE
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
TYPE_DATE
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
The collection instance.
Methods
__construct()
addField()
null|string|\SetaPDF_Merger_Collection_Schema_Field $fieldOrFieldName = null,
?string $dataType = null,
?int $order = null
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 : ?string
The data field or type. See class constants for possible values.
- $order : ?int
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 \setasign\SetaPDF2\Core\SecHandler\Exception
Throws \setasign\SetaPDF2\Core\Type\Exception
See
addFields()
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
getDictionary()
Get and/or create the schema dictionary.
Parameters
- $create : bool
Exceptions
getField()
Get a field instance by its name.
Parameters
- $name : string
Exceptions
getFields()
hasField()
Check if a field exists.
Parameters
- $name : string