Moodle PHP Documentation 4.1
Moodle 4.1.19 (Build: 20250609) (a0a0458154d)
PdfDictionary Class Reference

Class representing a PDF dictionary object. More...

Inheritance diagram for PdfDictionary:
PdfType

Static Public Member Functions

static create (array $entries=[])
 Helper method to create an instance.
 
static ensure ($dictionary)
 Ensures that the passed value is a PdfDictionary instance.
 
static get ($dictionary, $key, PdfType $default=null)
 Get a value by its key from a dictionary or a default value.
 
static parse (Tokenizer $tokenizer, StreamReader $streamReader, PdfParser $parser)
 Parses a dictionary of the passed tokenizer, stream-reader and parser.
 
static resolve (PdfType $value, PdfParser $parser, $stopAtIndirectObject=false)
 Resolves a PdfType value to its value.
 

Public Attributes

mixed $value
 The value of the PDF type.
 

Static Protected Member Functions

static ensureType ($type, $value, $errorMessage)
 Ensure that a value is an instance of a specific PDF type.
 

Detailed Description

Class representing a PDF dictionary object.

Member Function Documentation

◆ create()

static PdfDictionary::create ( array $entries = [])
static

Helper method to create an instance.

Parameters
PdfType[]$entriesThe keys are the name entries of the dictionary.
Return values
self

◆ ensure()

static PdfDictionary::ensure ( $dictionary)
static

Ensures that the passed value is a PdfDictionary instance.

Parameters
mixed$dictionary
Return values
self
Exceptions
PdfTypeException

◆ ensureType()

static PdfType::ensureType ( $type,
$value,
$errorMessage )
staticprotectedinherited

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

Parameters
string$type
PdfType$value
string$errorMessage
Return values
mixed
Exceptions
PdfTypeException

◆ get()

static PdfDictionary::get ( $dictionary,
$key,
PdfType $default = null )
static

Get a value by its key from a dictionary or a default value.

Parameters
mixed$dictionary
string$key
PdfType | null$default
Return values
PdfNull|PdfType
Exceptions
PdfTypeException

◆ parse()

static PdfDictionary::parse ( Tokenizer $tokenizer,
StreamReader $streamReader,
PdfParser $parser )
static

Parses a dictionary of the passed tokenizer, stream-reader and parser.

Parameters
Tokenizer$tokenizer
StreamReader$streamReader
PdfParser$parser
Return values
bool|self
Exceptions
PdfTypeException

◆ resolve()

static PdfType::resolve ( PdfType $value,
PdfParser $parser,
$stopAtIndirectObject = false )
staticinherited

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
PdfType$value
PdfParser$parser
bool$stopAtIndirectObject
Return values
PdfType
Exceptions
CrossReferenceException
PdfParserException

The documentation for this class was generated from the following file: