SetaPDF_Merger_Collection_Item Class representing a collection item.
File: /SetaPDF v2/Merger/Collection/Item.php
A collection item shall contain the data described in the collection schema for a particular file or folder.
Class hierarchy
Summary
Properties
Methods
__construct()
The constructor.
Parameters
- $dictionary : SetaPDF_Core_Type_Dictionary|null
_createPdfValue()
Prepares a value depending on its type.
Parameters
- $value : string|number
- $type : string
Exceptions
getData()
Get the data as PHP values.
Return Values
If the value is a collection subitem the value will be an array of 2 values where the first key is the value and the second the prefix.
setData()
Set several entries in this item.
Parameters
- $data : array
The keys are the entry names.
- $schema : SetaPDF_Merger_Collection_Schema
Exceptions
setEntry()
Set the data of an entry in this collection item.
Parameters
- $name : string
- $value : mixed
To create a subitem, pass an array of 2 values where the first value is the data and the second value is the prefix.
- $type : null|string|SetaPDF_Merger_Collection_Schema
If $type is null the type will be resolved by the PHP type. Othersie a constant value of
SetaPDF_Merger_Collection_Schema::DATA_TYPE_*
have to be passed or an instance ofSetaPDF_Merger_Collection_Schema
from which the type will be resolved automatically and ensured that the field exists in the schema.