Zend Framework  1.12
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Zend_Pdf_Element Class Reference

Public Member Functions

 getType ()
 Return type of the element.
 
 toString ($factory=null)
 Convert element to a string, which can be directly written to a PDF file.
 
 makeClone (Zend_Pdf_ElementFactory $factory, array &$processed, $mode)
 Detach PDF object from the factory (if applicable), clone it and attach to new factory.
 
 setParentObject (Zend_Pdf_Element_Object $parent)
 Set top level parent indirect object.
 
 getParentObject ()
 Get top level parent indirect object.
 
 touch ()
 Mark object as modified, to include it into new PDF file segment.
 
 cleanUp ()
 Clean up resources, used by object.
 
 toPhp ()
 Convert PDF element to PHP type.
 

Static Public Member Functions

static phpToPdf ($input)
 Convert PHP value into PDF element.
 

Public Attributes

const TYPE_BOOL = 1
 
const TYPE_NUMERIC = 2
 
const TYPE_STRING = 3
 
const TYPE_NAME = 4
 
const TYPE_ARRAY = 5
 
const TYPE_DICTIONARY = 6
 
const TYPE_STREAM = 7
 
const TYPE_NULL = 11
 
const CLONE_MODE_SKIP_PAGES = 1
 
const CLONE_MODE_FORCE_CLONING = 2
 

Member Function Documentation

cleanUp ( )

Clean up resources, used by object.

getParentObject ( )

Get top level parent indirect object.

Returns
Zend_Pdf_Element_Object
getType ( )
abstract

Return type of the element.

See ZPdfPDFConst for possible values

Returns
integer
makeClone ( Zend_Pdf_ElementFactory  $factory,
array &  $processed,
  $mode 
)

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

Todo:
It's nevessry to check if SplObjectStorage class works faster (Needs PHP 5.3.x to attach object _with_ additional data to storage)
Parameters
Zend_Pdf_ElementFactory$factoryThe factory to attach
array&$processedList of already processed indirect objects, used to avoid objects duplication
integer$modeCloning mode (defines filter for objects cloning)
Returns
Zend_Pdf_Element
static phpToPdf (   $input)
static

Convert PHP value into PDF element.

Parameters
mixed$input
Returns
Zend_Pdf_Element
setParentObject ( Zend_Pdf_Element_Object  $parent)

Set top level parent indirect object.

Parameters
Zend_Pdf_Element_Object$parent
toPhp ( )

Convert PDF element to PHP type.

Returns
mixed
toString (   $factory = null)
abstract

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

$factory parameter defines operation context.

Parameters
Zend_Pdf_Factory$factory
Returns
string
touch ( )

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

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

Member Data Documentation

const CLONE_MODE_FORCE_CLONING = 2
const CLONE_MODE_SKIP_PAGES = 1
const TYPE_ARRAY = 5
const TYPE_BOOL = 1
const TYPE_DICTIONARY = 6
const TYPE_NAME = 4
const TYPE_NULL = 11
const TYPE_NUMERIC = 2
const TYPE_STREAM = 7
const TYPE_STRING = 3