PDF file 'dictionary' element implementation

category Zend
package Zend_Pdf
copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License
inherited_from \Zend_Pdf_Element

 Methods

Object constructor

__construct(array $val = null

Parameters

$val

array
  • array of Zend_Pdf_Element objects

Exceptions

\Zend_Pdf_Exception

Get handler

__get($item) : \Zend_Pdf_Element

Parameters

$item

Returns

\Zend_Pdf_Element| null

Set handler

__set($item, mixed $value) 

Parameters

$item

$value

mixed

Add element to an array

add(\Zend_Pdf_Element_Name $name, \Zend_Pdf_Element $val) 
name Zend_Pdf_Element_Name $name

Parameters

$name

$val

\Zend_Pdf_Element
  • Zend_Pdf_Element object

Exceptions

\Zend_Pdf_Exception

Clean up resources, used by object

cleanUp() 
Inherited

Return dictionary keys

getKeys() : array

Returns

array

Get top level parent indirect object.

getParentObject() : \Zend_Pdf_Element_Object
Inherited

Returns

\Zend_Pdf_Element_Object

Return type of the element.

getType() : integer

See ZPdfPDFConst for possible values

inherited_from \Zend_Pdf_Element::getType()

Returns

integer

Return type of the element.

getType() : integer
Inherited

See ZPdfPDFConst for possible values

Returns

integer

Detach PDF object from the factory (if applicable), clone it and attach to new factory.

makeClone(\Zend_Pdf_ElementFactory $factory, array $processed, integer $mode) 
returns Zend_Pdf_Element
inherited_from \Zend_Pdf_Element::makeClone()

Parameters

$factory

\Zend_Pdf_ElementFactory

The factory to attach

$processed

$mode

integer

Cloning mode (defines filter for objects cloning)

Exceptions

\Zend_Pdf_Exception

Detach PDF object from the factory (if applicable), clone it and attach to new factory.

makeClone(\Zend_Pdf_ElementFactory $factory, array $processed, integer $mode) 
Inherited
todo It's nevessry to check if SplObjectStorage class works faster (Needs PHP 5.3.x to attach object _with_ additional data to storage)
returns Zend_Pdf_Element

Parameters

$factory

\Zend_Pdf_ElementFactory

The factory to attach

$processed

$mode

integer

Cloning mode (defines filter for objects cloning)

Convert PHP value into PDF element.

phpToPdf(mixed $input) : \Zend_Pdf_Element
InheritedStatic

Parameters

$input

mixed

Returns

\Zend_Pdf_Element

Set top level parent indirect object.

setParentObject(\Zend_Pdf_Element_Object $parent) 
inherited_from \Zend_Pdf_Element::setParentObject()

Parameters

$parent

\Zend_Pdf_Element_Object

Set top level parent indirect object.

setParentObject(\Zend_Pdf_Element_Object $parent) 
Inherited

Parameters

$parent

\Zend_Pdf_Element_Object

Convert PDF element to PHP type.

toPhp() : mixed

Dictionary is returned as an associative array

inherited_from \Zend_Pdf_Element::toPhp()

Returns

mixed

Convert PDF element to PHP type.

toPhp() : mixed
Inherited

Returns

mixed

Return object as string

toString(\Zend_Pdf_Factory $factory = null) : string

$factory parameter defines operation context.

inherited_from \Zend_Pdf_Element::toString()

Parameters

$factory

\Zend_Pdf_Factory

Returns

string

Convert element to a string, which can be directly written to a PDF file.

toString(\Zend_Pdf_Factory $factory = null) : string
Inherited

$factory parameter defines operation context.

Parameters

$factory

\Zend_Pdf_Factory

Returns

string

Mark object as modified, to include it into new PDF file segment.

touch() 
Inherited

We don't automate this action to keep control on PDF update process. All new objects are treated as "modified" automatically.

 Properties

 

Dictionary elements Array of Zend_Pdf_Element objects ('name' => Zend_Pdf_Element)

$_items : array

Default

array()
 

Reference to the top level indirect object, which contains this element.

$_parentObject : \Zend_Pdf_Element_Object

Default

null

 Constants

 

CLONE_MODE_FORCE_CLONING

CLONE_MODE_FORCE_CLONING = 2 
 

CLONE_MODE_SKIP_PAGES

CLONE_MODE_SKIP_PAGES = 1 
 

TYPE_ARRAY

TYPE_ARRAY = 5 
 

TYPE_BOOL

TYPE_BOOL = 1 
 

TYPE_DICTIONARY

TYPE_DICTIONARY = 6 
 

TYPE_NAME

TYPE_NAME = 4 
 

TYPE_NULL

TYPE_NULL = 11 
 

TYPE_NUMERIC

TYPE_NUMERIC = 2 
 

TYPE_STREAM

TYPE_STREAM = 7 
 

TYPE_STRING

TYPE_STRING = 3