setasign\SetaPDF2\Merger\Collection\Schema

Field Class representing a field in a schema.

File: /SetaPDF v2/Merger/Collection/Schema/Field.php
Old class name (alias): \SetaPDF_Merger_Collection_Schema_Field

Class hierarchy

Summary

Properties

$_dictionary


Static Methods

create()

public static Field::create (
string $fieldName,
string $dataType,
string $encoding = 'UTF-8'
): Field

Create a schema field by a name and data type.

Parameters
$fieldName : string
 
$dataType : string
 
$encoding : string
 

Methods

__construct()

The constructor.

Parameters
$dictionary : \setasign\SetaPDF2\Core\Type\PdfDictionary
 

getAllowEdit()

public Field::getAllowEdit (
void
): bool

Get a flag indicating whether the interactive PDF processor should provide support for editing the field value.

getDataType()

public Field::getDataType (
void
): string

Get the data type.

Exceptions

Throws \setasign\SetaPDF2\Core\Type\Exception

getDictionary()

Get the field dictionary.

getName()

public Field::getName (
string $encoding = 'UTF-8'
): string

Get the textual field name that shall be presented to the user by the interactive PDF processor.

Parameters
$encoding : string
 
Exceptions

Throws \setasign\SetaPDF2\Core\Type\Exception

getOrder()

public Field::getOrder (
void
): ?int

Get the relative order of the field name in the user interface.

getVisibility()

public Field::getVisibility (
void
): bool

Get the initial visibility of the field in the user interface.

setAllowEdit()

public Field::setAllowEdit (
bool $allowEdit
): Field

Set a flag indicating whether the interactive PDF processor should provide support for editing the field value.

Parameters
$allowEdit : bool
 

setDataType()

public Field::setDataType (
string $dataType
): Field

Set the data type.

Parameters
$dataType : string
 

setName()

public Field::setName (
string $name,
string $encoding = 'UTF-8'
): Field

Set the textual field name that shall be presented to the user by the interactive PDF processor.

Parameters
$name : string
 
$encoding : string
 

setOrder()

public Field::setOrder (
int $order
): Field

Set the relative order of the field name in the user interface.

If you set it, you should set this in all fields. Otherwise you will get an unexpected result in different PDF viewers.

Parameters
$order : int
 

setVisibility()

public Field::setVisibility (
bool $visibility
): Field

Set the initial visibility of the field in the user interface.

Parameters
$visibility : bool