Documentation

PdfName extends PdfType
in package

Class representing a PDF name object

Table of Contents

Properties

$value  : mixed
The value of the PDF type.

Methods

create()  : self
Helper method to create an instance.
ensure()  : self
Ensures that the passed value is a PdfName instance.
flatten()  : PdfType
Flatten indirect object references to direct objects.
parse()  : self
Parses a name object from the passed tokenizer and stream-reader.
resolve()  : PdfType
Resolves a PdfType value to its value.
unescape()  : string
Unescapes a name string.
ensureType()  : mixed
Ensure that a value is an instance of a specific PDF type.

Properties

$value

The value of the PDF type.

public mixed $value

Methods

create()

Helper method to create an instance.

public static create(string $string) : self
Parameters
$string : string
Return values
self

ensure()

Ensures that the passed value is a PdfName instance.

public static ensure(mixed $name) : self
Parameters
$name : mixed
Tags
throws
PdfTypeException
Return values
self

resolve()

Resolves a PdfType value to its value.

public static resolve(PdfType $value, PdfParser $parser[, bool $stopAtIndirectObject = false ][, array<string|int, mixed> &$ensuredObjectsList = [] ]) : PdfType

This method is used to evaluate indirect and direct object references until a final value is reached.

Parameters
$value : PdfType
$parser : PdfParser
$stopAtIndirectObject : bool = false
$ensuredObjectsList : array<string|int, mixed> = []

A list of all ensured indirect objects to prevent recursion

Tags
throws
CrossReferenceException
throws
PdfParserException
Return values
PdfType

unescape()

Unescapes a name string.

public static unescape(string $value) : string
Parameters
$value : string
Return values
string

ensureType()

Ensure that a value is an instance of a specific PDF type.

protected static ensureType(string $type, PdfType $value, string $errorMessage) : mixed
Parameters
$type : string
$value : PdfType
$errorMessage : string
Tags
throws
PdfTypeException

        
On this page

Search results