PageRenderTime 38ms CodeModel.GetById 34ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/framework/vendor/zend/Zend/Pdf/ElementFactory/Interface.php

http://zoop.googlecode.com/
PHP | 151 lines | 19 code | 15 blank | 117 comment | 0 complexity | ab8ab2577b547eccf83ff382c6df4243 MD5 | raw file
  1<?php
  2/**
  3 * Zend Framework
  4 *
  5 * LICENSE
  6 *
  7 * This source file is subject to the new BSD license that is bundled
  8 * with this package in the file LICENSE.txt.
  9 * It is also available through the world-wide-web at this URL:
 10 * http://framework.zend.com/license/new-bsd
 11 * If you did not receive a copy of the license and are unable to
 12 * obtain it through the world-wide-web, please send an email
 13 * to license@zend.com so we can send you a copy immediately.
 14 *
 15 * @category   Zend
 16 * @package    Zend_Pdf
 17 * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
 18 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 19 * @version    $Id: Interface.php 20096 2010-01-06 02:05:09Z bkarwin $
 20 */
 21
 22/**
 23 * PDF element factory interface.
 24 * Responsibility is to log PDF changes
 25 *
 26 * @package    Zend_Pdf
 27 * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
 28 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 29 */
 30interface Zend_Pdf_ElementFactory_Interface
 31{
 32    /**
 33     * Close factory and clean-up resources
 34     *
 35     * @internal
 36     */
 37    public function close();
 38
 39    /**
 40     * Get source factory object
 41     *
 42     * @return Zend_Pdf_ElementFactory
 43     */
 44    public function resolve();
 45
 46    /**
 47     * Get factory ID
 48     *
 49     * @return integer
 50     */
 51    public function getId();
 52
 53    /**
 54     * Set object counter
 55     *
 56     * @param integer $objCount
 57     */
 58    public function setObjectCount($objCount);
 59
 60    /**
 61     * Get object counter
 62     *
 63     * @return integer
 64     */
 65    public function getObjectCount();
 66
 67    /**
 68     * Attach factory to the current;
 69     *
 70     * @param Zend_Pdf_ElementFactory_Interface $factory
 71     */
 72    public function attach(Zend_Pdf_ElementFactory_Interface $factory);
 73
 74    /**
 75     * Calculate object enumeration shift.
 76     *
 77     * @param Zend_Pdf_ElementFactory_Interface $factory
 78     * @return integer
 79     */
 80    public function calculateShift(Zend_Pdf_ElementFactory_Interface $factory);
 81
 82    /**
 83     * Clean enumeration shift cache.
 84     * Has to be used after PDF render operation to let followed updates be correct.
 85     *
 86     * @param Zend_Pdf_ElementFactory_Interface $factory
 87     * @return integer
 88     */
 89    public function cleanEnumerationShiftCache();
 90
 91    /**
 92     * Retrive object enumeration shift.
 93     *
 94     * @param Zend_Pdf_ElementFactory_Interface $factory
 95     * @return integer
 96     * @throws Zend_Pdf_Exception
 97     */
 98    public function getEnumerationShift(Zend_Pdf_ElementFactory_Interface $factory);
 99
100    /**
101     * Mark object as modified in context of current factory.
102     *
103     * @param Zend_Pdf_Element_Object $obj
104     * @throws Zend_Pdf_Exception
105     */
106    public function markAsModified(Zend_Pdf_Element_Object $obj);
107
108    /**
109     * Remove object in context of current factory.
110     *
111     * @param Zend_Pdf_Element_Object $obj
112     * @throws Zend_Pdf_Exception
113     */
114    public function remove(Zend_Pdf_Element_Object $obj);
115
116    /**
117     * Generate new Zend_Pdf_Element_Object
118     *
119     * @todo Reusage of the freed object. It's not a support of new feature, but only improvement.
120     *
121     * @param Zend_Pdf_Element $objectValue
122     * @return Zend_Pdf_Element_Object
123     */
124    public function newObject(Zend_Pdf_Element $objectValue);
125
126    /**
127     * Generate new Zend_Pdf_Element_Object_Stream
128     *
129     * @todo Reusage of the freed object. It's not a support of new feature, but only improvement.
130     *
131     * @param mixed $objectValue
132     * @return Zend_Pdf_Element_Object_Stream
133     */
134    public function newStreamObject($streamValue);
135
136    /**
137     * Enumerate modified objects.
138     * Returns array of Zend_Pdf_UpdateInfoContainer
139     *
140     * @param Zend_Pdf_ElementFactory $rootFactory
141     * @return array
142     */
143    public function listModifiedObjects($rootFactory = null);
144
145    /**
146     * Check if PDF file was modified
147     *
148     * @return boolean
149     */
150    public function isModified();
151}