Pdf/StringParser.php
Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled
with this package in the file LICENSE.txt.
It is also available through the world-wide-web at this URL:
http://framework.zend.com/license/new-bsd
If you did not receive a copy of the license and are unable to
obtain it through the world-wide-web, please send an email
to license@zend.com so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Pdf
- Version
- $Id$
\Zend_Pdf_StringParser
Package: Zend_Pdf














PDF string parser
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties

\Zend_Pdf_Element_Reference_Context $_context = nullCurrent reference context
Default value
nullDetails
array $_elements = array()Array of elements of the currently parsed object/trailer
Default value
array()Details- Type
- array
Methods

__construct( $source, \Zend_Pdf_ElementFactory_Interface $factory) : voidObject constructor
Note: PHP duplicates string, which is sent by value, only of it's updated.
Thus we don't need to care about overhead
Parameters| Name | Type | Description |
|---|---|---|
| $source | ||
| $factory | \Zend_Pdf_ElementFactory_Interface |

_readArray() : \Zend_Pdf_Element_ArrayRead array PDF object Also reads trailing ']' from a pdf stream
Returns
Throws
| Type | Description |
|---|---|
| \Zend_Pdf_Element_Array |
| Exception | Description |
|---|---|
| \Zend_Pdf_Exception |

_readBinaryString() : \Zend_Pdf_Element_String_BinaryRead binary string PDF object Also reads trailing '>' from a pdf stream
Returns
Throws
| Type | Description |
|---|---|
| \Zend_Pdf_Element_String_Binary |
| Exception | Description |
|---|---|
| \Zend_Pdf_Exception |

_readDictionary() : \Zend_Pdf_Element_DictionaryRead dictionary PDF object Also reads trailing '>>' from a pdf stream
Returns
Throws
| Type | Description |
|---|---|
| \Zend_Pdf_Element_Dictionary |
| Exception | Description |
|---|---|
| \Zend_Pdf_Exception |

_readNumeric(string $nextLexeme = null) : \Zend_Pdf_Element_NumericRead numeric PDF object
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $nextLexeme | string |
| Type | Description |
|---|---|
| \Zend_Pdf_Element_Numeric |

_readReference(string $nextLexeme = null) : \Zend_Pdf_Element_ReferenceRead reference PDF object
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $nextLexeme | string |
| Type | Description |
|---|---|
| \Zend_Pdf_Element_Reference |

_readString() : \Zend_Pdf_Element_StringRead string PDF object Also reads trailing ')' from a pdf stream
Returns
Throws
| Type | Description |
|---|---|
| \Zend_Pdf_Element_String |
| Exception | Description |
|---|---|
| \Zend_Pdf_Exception |

getObject(integer $offset, \Zend_Pdf_Element_Reference_Context $context) : \Zend_Pdf_Element_ObjectRead inderect object from a PDF stream
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $offset | integer | |
| $context | \Zend_Pdf_Element_Reference_Context |
| Type | Description |
|---|---|
| \Zend_Pdf_Element_Object |

isDelimiter(integer $chCode) : booleanstatic
Character with code $chCode is a delimiter character
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $chCode | integer |
| Type | Description |
|---|---|
| boolean |

isWhiteSpace(integer $chCode) : booleanstatic
Character with code $chCode is white space
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $chCode | integer |
| Type | Description |
|---|---|
| boolean |

parseIntFromStream(string $stream, integer $offset, integer $size) : integerstatic
Parse integer value from a binary stream
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $stream | string | |
| $offset | integer | |
| $size | integer |
| Type | Description |
|---|---|
| integer |

readElement( $nextLexeme = null) : \Zend_Pdf_ElementRead elemental object from a PDF stream
Parameters
Returns
Throws
| Name | Type | Description |
|---|---|---|
| $nextLexeme |
| Type | Description |
|---|---|
| \Zend_Pdf_Element |
| Exception | Description |
|---|---|
| \Zend_Pdf_Exception |

setContext(\Zend_Pdf_Element_Reference_Context $context) : voidSet current context
Parameters
| Name | Type | Description |
|---|---|---|
| $context | \Zend_Pdf_Element_Reference_Context |