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

$_dictionary

The collection item dictionary.


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

Throws SetaPDF_Exception_NotImplemented

getData()

public SetaPDF_Merger_Collection_Item::getData (
void
): array

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.

getDictionary()

setData()

public SetaPDF_Merger_Collection_Item::setData (
array $data [, SetaPDF_Merger_Collection_Schema $schema = null ]
): void

Set several entries in this item.

Parameters
$data : array

The keys are the entry names.

$schema : SetaPDF_Merger_Collection_Schema
 
Exceptions

Throws SetaPDF_Exception_NotImplemented

setEntry()

public SetaPDF_Merger_Collection_Item::setEntry (
string $name, mixed $value [, null|string|SetaPDF_Merger_Collection_Schema $type = null ]
): void

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 of SetaPDF_Merger_Collection_Schema from which the type will be resolved automatically and ensured that the field exists in the schema.

Exceptions

Throws SetaPDF_Exception_NotImplemented