PDF-Signer

Dictionary
in package
implements Countable, IteratorAggregate

FinalYes

A PDF dictionary: keys are names, held without their slash, in the order they were read or set.

It is an object rather than a PHP array so that an empty dictionary and an empty array stay different.

Tags
implements

Table of Contents

Interfaces

Countable
IteratorAggregate

Properties

$entries  : array<string|int, mixed>

Methods

__construct()  : mixed
all()  : array<string, mixed>
The entries, keyed by name without the slash.
count()  : int
get()  : mixed
The value under a key, or null when there is none, which PDF treats the same as a null value.
getIterator()  : ArrayIterator
has()  : bool
Whether the dictionary has a key.
isName()  : bool
Whether a key holds a name with the given value, such as `/Type /Page`.
remove()  : self
Removes a key, if it is there.
set()  : self
Sets a key, replacing any value it had.

Properties

$entries

private array<string|int, mixed> $entries = []

Methods

__construct()

public __construct([array<string, mixed> $entries = [] ]) : mixed
Parameters
$entries : array<string, mixed> = []

The entries, keyed by name without the slash.

all()

The entries, keyed by name without the slash.

public all() : array<string, mixed>
Return values
array<string, mixed>

count()

public count() : int
Tags
inheritDoc
Return values
int

get()

The value under a key, or null when there is none, which PDF treats the same as a null value.

public get(string $key) : mixed
Parameters
$key : string

The key, without the slash.

getIterator()

public getIterator() : ArrayIterator
Tags
inheritDoc
Return values
ArrayIterator

has()

Whether the dictionary has a key.

public has(string $key) : bool
Parameters
$key : string

The key, without the slash.

Return values
bool

isName()

Whether a key holds a name with the given value, such as `/Type /Page`.

public isName(string $key, string $name) : bool
Parameters
$key : string

The key, without the slash.

$name : string

The name, without the slash.

Return values
bool

remove()

Removes a key, if it is there.

public remove(string $key) : self
Parameters
$key : string

The key, without the slash.

Return values
self

set()

Sets a key, replacing any value it had.

public set(string $key, mixed $value) : self
Parameters
$key : string

The key, without the slash.

$value : mixed

The new value.

Return values
self
On this page

Search results