setasign\SetaPDF2\Core\Parser
Pdf A PDF parser
File: /SetaPDF v2/Core/Parser/Pdf.php
Old class name (alias):
\SetaPDF_Core_Parser_Pdf
Class hierarchy
Summary
Properties
$_currentObject
The current object which is parsed
$_owner
The owner document
$_passOwningObjectToChilds
If set to true the owning object is passed to parsed child elements
This is needed to create a relation between a parsed object and its owning element. The complete chain will be able to get a relation to the owning document. Needed for example for handling en- and decryption of strings or streams.
$_reader
The reader class
$_tokenizer
The tokenizer
Methods
__construct()
_ensureExpectedValue()
Ensures that the token will evaluate to an expected object type (or not).
Parameters
- $token : string
- $expectedType : ?string
Exceptions
Throws Pdf\InvalidTokenException
_readValue()
?string $expectedType = null
Read a value based on a token.
Parameters
- $token : ?string
- $expectedType : ?string
Exceptions
Throws Pdf\InvalidTokenException
Throws \setasign\SetaPDF2\Core\Exception
Throws \UnexpectedValueException
getReader()
readValue()
Read a value.
Parameters
- $expectedType : ?string
Exceptions
Throws \setasign\SetaPDF2\Core\Exception
Throws Pdf\InvalidTokenException
setOwner()
setPassOwningObjectToChilds()
Define if the owning object should be passed to it's childs.
Parameters
- $passOwningObjectToChilds : bool
See
- $_passOwningObjectToChilds
setReader()
skipUntilToken()
Skips tokens until a special token is found.
This method can be used to e.g. jump over binary inline image data.
Parameters
- $token : string
- $inToken : bool
Defines if the token should match exactly or if a strpos should be used to find the token.