API Documentation

Zend/Pdf/StringParser.php

Show: inherited
Table of Contents

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-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Pdf  
Version
$Id: StringParser.php 24594 2012-01-05 21:27:01Z matthew $  

\Zend_Pdf_StringParser

Package: Zend\Pdf

PDF string parser

Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Properties

Propertyprivate\Zend_Pdf_Element_Reference_Context  $_context= 'null'

Current reference context

Default valuenullDetails
Type
\Zend_Pdf_Element_Reference_Context
Propertyprivatearray  $_elements= 'array()'

Array of elements of the currently parsed object/trailer

Default valuearray()Details
Type
array
Propertyprivate\Zend_Pdf_ElementFactory_Interface  $_objFactory= 'null'

PDF objects factory.

Default valuenullDetails
Type
\Zend_Pdf_ElementFactory_Interface
Propertypublicstring  $data= ''''

Source PDF

Default value''Details
Type
string
Propertypublicinteger  $offset= '0'

Current position in a data

Default value0Details
Type
integer

Methods

methodpublic__construct(  $source, \Zend_Pdf_ElementFactory_Interface $factory ) : void

Object 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
methodprivate_readArray( ) : \Zend_Pdf_Element_Array

Read array PDF object Also reads trailing ']' from a pdf stream

Returns
Type Description
\Zend_Pdf_Element_Array
Throws
Exception Description
\Zend_Pdf_Exception
methodprivate_readBinaryString( ) : \Zend_Pdf_Element_String_Binary

Read binary string PDF object Also reads trailing '>' from a pdf stream

Returns
Type Description
\Zend_Pdf_Element_String_Binary
Throws
Exception Description
\Zend_Pdf_Exception
methodprivate_readDictionary( ) : \Zend_Pdf_Element_Dictionary

Read dictionary PDF object Also reads trailing '>>' from a pdf stream

Returns
Type Description
\Zend_Pdf_Element_Dictionary
Throws
Exception Description
\Zend_Pdf_Exception
methodprivate_readNumeric( string $nextLexeme = null ) : \Zend_Pdf_Element_Numeric

Read numeric PDF object

Parameters
Name Type Description
$nextLexeme string
Returns
Type Description
\Zend_Pdf_Element_Numeric
methodprivate_readReference( string $nextLexeme = null ) : \Zend_Pdf_Element_Reference

Read reference PDF object

Parameters
Name Type Description
$nextLexeme string
Returns
Type Description
\Zend_Pdf_Element_Reference
methodprivate_readString( ) : \Zend_Pdf_Element_String

Read string PDF object Also reads trailing ')' from a pdf stream

Returns
Type Description
\Zend_Pdf_Element_String
Throws
Exception Description
\Zend_Pdf_Exception
methodpubliccleanUp( ) : void

Clean up resources.

Clear current state to remove cyclic object references

methodpublicgetLength( ) : integer

Get length of source string

Returns
Type Description
integer
methodpublicgetObject( integer $offset, \Zend_Pdf_Element_Reference_Context $context ) : \Zend_Pdf_Element_Object

Read inderect object from a PDF stream

Parameters
Name Type Description
$offset integer
$context \Zend_Pdf_Element_Reference_Context
Returns
Type Description
\Zend_Pdf_Element_Object
methodpublicgetString( ) : string

Get source string

Returns
Type Description
string
methodpublicisDelimiter( integer $chCode ) : boolean
static

Character with code $chCode is a delimiter character

Parameters
Name Type Description
$chCode integer
Returns
Type Description
boolean
methodpublicisWhiteSpace( integer $chCode ) : boolean
static

Character with code $chCode is white space

Parameters
Name Type Description
$chCode integer
Returns
Type Description
boolean
methodpublicparseIntFromStream( string $stream, integer $offset, integer $size ) : integer
static

Parse integer value from a binary stream

Parameters
Name Type Description
$stream string
$offset integer
$size integer
Returns
Type Description
integer
methodpublicreadComment( ) : string

Read comment line

Returns
Type Description
string
methodpublicreadElement(  $nextLexeme = null ) : \Zend_Pdf_Element

Read elemental object from a PDF stream

Parameters
Name Type Description
$nextLexeme
Returns
Type Description
\Zend_Pdf_Element
Throws
Exception Description
\Zend_Pdf_Exception
methodpublicreadLexeme( ) : string

Returns next lexeme from a pdf stream

Returns
Type Description
string
methodpublicsetContext( \Zend_Pdf_Element_Reference_Context $context ) : void

Set current context

Parameters
Name Type Description
$context \Zend_Pdf_Element_Reference_Context
methodpublicskipComment( ) : void

Skip comment

methodpublicskipWhiteSpace( boolean $skipComment = true ) : void

Skip white space

Parameters
Name Type Description
$skipComment boolean
Documentation was generated by DocBlox 0.15.1.