setasign\SetaPDF2\Merger\Collection
Item Class representing a collection item.
File: /SetaPDF v2/Merger/Collection/Item.php
Old class name (alias):
\SetaPDF_Merger_Collection_Item
A collection item shall contain the data described in the collection schema for a particular file or folder.
Class hierarchy
Summary
Properties
$_dictionary
The collection item dictionary.
Methods
__construct()
_createPdfValue()
string $type
Prepares a value depending on its type.
Parameters
- $value : string|number
- $type : string
Exceptions
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 Schema::DATA_TYPE_* have to be passed or an instance of Schema from which the type will be resolved automatically and ensured that the field exists in the schema.