Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
LineReader Class Reference

Class LineReader. More...

Inheritance diagram for LineReader:
AbstractReader ReaderInterface

Public Member Functions

 __construct (PdfParser $parser)
 LineReader constructor.
 
 getOffsetFor ($objectNumber)
 Get an offset by an object number.
Parameters
int$objectNumber
Return values
int|boolFalse if the offset was not found.

 
 getOffsets ()
 Get all found offsets.
 
 getTrailer ()
 Get the trailer dictionary.
 
 getTrailer ()
 Get the trailer related to this cross reference.
 

Protected Member Functions

 extract (StreamReader $reader)
 Extracts the cross reference data from the stream reader.
 
 read ($xrefContent)
 Read the cross-reference entries.
 
 readTrailer ()
 Read the trailer dictionary.
 

Protected Attributes

array $offsets
 The object offsets.
 
PdfParser $parser
 
PdfDictionary $trailer
 

Detailed Description

Class LineReader.

This reader class read all cross-reference entries in a single run. It supports reading cross-references with e.g. invalid data (e.g. entries with a length < or > 20 bytes).

Constructor & Destructor Documentation

◆ __construct()

LineReader::__construct ( PdfParser $parser)

LineReader constructor.

Parameters
PdfParser$parser
Exceptions
CrossReferenceException

Reimplemented from AbstractReader.

Member Function Documentation

◆ extract()

LineReader::extract ( StreamReader $reader)
protected

Extracts the cross reference data from the stream reader.

Parameters
StreamReader$reader
Return values
string
Exceptions
CrossReferenceException

◆ getOffsetFor()

LineReader::getOffsetFor ( $objectNumber)

Get an offset by an object number.

Parameters
int$objectNumber
Return values
int|boolFalse if the offset was not found.

Return values
int|false

Implements ReaderInterface.

◆ getOffsets()

LineReader::getOffsets ( )

Get all found offsets.

Return values
array

◆ getTrailer() [1/2]

AbstractReader::getTrailer ( )
inherited

Get the trailer dictionary.

Return values
PdfDictionary

◆ getTrailer() [2/2]

ReaderInterface::getTrailer ( )
inherited

Get the trailer related to this cross reference.

Return values
PdfDictionary

◆ read()

LineReader::read ( $xrefContent)
protected

Read the cross-reference entries.

Parameters
string$xrefContent
Exceptions
CrossReferenceException

◆ readTrailer()

AbstractReader::readTrailer ( )
protectedinherited

Read the trailer dictionary.

Exceptions
CrossReferenceException
PdfTypeException

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