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
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
Constant defining the size property
TYPE_DATE
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
Methods
__construct()
addField()
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
- SetaPDF_Merger_Collection_Schema::DATA_FILE_NAME
- SetaPDF_Merger_Collection_Schema::DATA_DESCRIPTION
- SetaPDF_Merger_Collection_Schema::DATA_SIZE
- SetaPDF_Merger_Collection_Schema::DATA_CREATION_DATE
- SetaPDF_Merger_Collection_Schema::DATA_MODIFICATION_DATE
- SetaPDF_Merger_Collection_Schema::DATA_COMPRESSED_SIZE
- SetaPDF_Merger_Collection_Schema::TYPE_NUMBER
- SetaPDF_Merger_Collection_Schema::TYPE_STRING
- SetaPDF_Merger_Collection_Schema::TYPE_DATE
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
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
getFields()
Get all field instances.
Exceptions
Throws SetaPDF_Core_SecHandler_Exception
Throws SetaPDF_Core_Type_Exception
hasField()
Check if a field exists.
Parameters
- $name : string
Exceptions
Throws SetaPDF_Core_SecHandler_Exception
Throws SetaPDF_Core_Type_Exception