Moodle PHP Documentation 4.4
Moodle 4.4.8+ (Build: 20250530) (000b0c27711)
PdfName Class Reference

Class representing a PDF name object. More...

Inheritance diagram for PdfName:
PdfType

Static Public Member Functions

static create ($string)
 Helper method to create an instance.
 
static ensure ($name)
 Ensures that the passed value is a PdfName instance.
 
static flatten (PdfType $value, PdfParser $parser)
 Flatten indirect object references to direct objects.
 
static parse (Tokenizer $tokenizer, StreamReader $streamReader)
 Parses a name object from the passed tokenizer and stream-reader.
 
static resolve (PdfType $value, PdfParser $parser, $stopAtIndirectObject=false)
 Resolves a PdfType value to its value.
 
static unescape ($value)
 Unescapes a name string.
 

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 name object.

Member Function Documentation

◆ create()

static PdfName::create ( $string)
static

Helper method to create an instance.

Parameters
string$string
Return values
self

◆ ensure()

static PdfName::ensure ( $name)
static

Ensures that the passed value is a PdfName instance.

Parameters
mixed$name
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

◆ flatten()

static PdfType::flatten ( PdfType $value,
PdfParser $parser )
staticinherited

Flatten indirect object references to direct objects.

Parameters
PdfType$value
PdfParser$parser
Return values
PdfType
Exceptions
CrossReferenceException
PdfParserException

◆ parse()

static PdfName::parse ( Tokenizer $tokenizer,
StreamReader $streamReader )
static

Parses a name object from the passed tokenizer and stream-reader.

Parameters
Tokenizer$tokenizer
StreamReader$streamReader
Return values
self

◆ 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

◆ unescape()

static PdfName::unescape ( $value)
static

Unescapes a name string.

Parameters
string$value
Return values
string

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