setasign\Fpdi\PdfParser\Type

PdfIndirectObject Class representing an indirect object

File: /FPDI v2/PdfParser/Type/PdfIndirectObject.php

Class hierarchy

Summary

Properties

$generationNumber

public int setasign\Fpdi\PdfParser\Type\PdfIndirectObject::$generationNumber

The generation number.

$objectNumber

public int setasign\Fpdi\PdfParser\Type\PdfIndirectObject::$objectNumber

The object number.

$value

public mixed setasign\Fpdi\PdfParser\Type\PdfIndirectObject::$value

The value of the PDF type.


Static Methods

create()

public static PdfIndirectObject::create (
int $objectNumber, int $generationNumber, PdfType $value
): PdfIndirectObject

Helper method to create an instance.

Parameters
$objectNumber : int
 
$generationNumber : int
 
$value : PdfType
 

ensure()

public static PdfIndirectObject::ensure (
mixed $indirectObject
): PdfIndirectObject

Ensures that the passed value is a PdfIndirectObject instance.

Parameters
$indirectObject : mixed
 

ensureType()

protected static PdfType::ensureType (
string $type, PdfType $value, string $errorMessage
): mixed

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

Parameters
$type : string
 
$value : PdfType
 
$errorMessage : string
 
Exceptions

Throws PdfTypeException

parse()

public static PdfIndirectObject::parse (
int $objectNumberToken, int $objectGenerationNumberToken, \setasign\Fpdi\PdfParser\PdfParser $parser, \setasign\Fpdi\PdfParser\Tokenizer $tokenizer, \setasign\Fpdi\PdfParser\StreamReader $reader
): bool|PdfIndirectObject

Parses an indirect object from a tokenizer, parser and stream-reader.

Parameters
$objectNumberToken : int
 
$objectGenerationNumberToken : int
 
$parser : \setasign\Fpdi\PdfParser\PdfParser
 
$tokenizer : \setasign\Fpdi\PdfParser\Tokenizer
 
$reader : \setasign\Fpdi\PdfParser\StreamReader
 

resolve()

public static PdfType::resolve (
PdfType $value, \setasign\Fpdi\PdfParser\PdfParser $parser [, bool $stopAtIndirectObject = false ]
): PdfType

Resolves a PdfType value to its value.

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

Parameters
$value : PdfType
 
$parser : \setasign\Fpdi\PdfParser\PdfParser
 
$stopAtIndirectObject : bool