SetaPDF_Merger_Collection_Schema Class for handling data schemas in PDF Collections/Portfolios/Packages.

File: /SetaPDF/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


Properties

$_collection


Methods

__construct()

The constructor.

Parameters
$collection : SetaPDF_Merger_Collection
 

addField()

public SetaPDF_Merger_Collection_Schema_Field SetaPDF_Merger_Collection_Schema::addField ( string $name [, null|string|SetaPDF_Merger_Collection_Schema_Field $fieldOrFieldName = null [, null|string $dataType = null [, null|integer $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 : 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.

See

addFields()

public void SetaPDF_Merger_Collection_Schema::addFields ( array $fields )

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

cleanUp()

Remove cycled references.

getCollection()

Get the collection instance.

getDictionary()

Get and/or create the schema dictionary.

Parameters
$create : bool
 

getField()

Get a field instance by its name.

Parameters
$name : string
 

getFields()

hasField()

public boolean SetaPDF_Merger_Collection_Schema::hasField ( string $name )

Check if a field exists.

Parameters
$name : string
 

removeField()

public boolean SetaPDF_Merger_Collection_Schema::removeField ( $name $name )

Remove a field from the schema.

Parameters
$name : $name