Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Protected Attributes
Zend_Pdf_Resource Class Reference
Inheritance diagram for Zend_Pdf_Resource:
Zend_Pdf_Resource_ContentStream Zend_Pdf_Resource_Font Zend_Pdf_Resource_GraphicsState Zend_Pdf_Resource_Image Zend_Pdf_Resource_Unified Zend_Pdf_Resource_Font_CidFont Zend_Pdf_Resource_Font_Extracted Zend_Pdf_Resource_Font_Simple Zend_Pdf_Resource_Font_Type0 Zend_Pdf_Resource_Image_Jpeg Zend_Pdf_Resource_Image_Png Zend_Pdf_Resource_Image_Tiff Zend_Pdf_Resource_Font_CidFont_TrueType Zend_Pdf_Resource_Font_Simple_Parsed Zend_Pdf_Resource_Font_Simple_Standard Zend_Pdf_Resource_Font_Simple_Parsed_TrueType Zend_Pdf_Resource_Font_Simple_Standard_Courier Zend_Pdf_Resource_Font_Simple_Standard_CourierBold Zend_Pdf_Resource_Font_Simple_Standard_CourierBoldOblique Zend_Pdf_Resource_Font_Simple_Standard_CourierOblique Zend_Pdf_Resource_Font_Simple_Standard_Helvetica Zend_Pdf_Resource_Font_Simple_Standard_HelveticaBold Zend_Pdf_Resource_Font_Simple_Standard_HelveticaBoldOblique Zend_Pdf_Resource_Font_Simple_Standard_HelveticaOblique Zend_Pdf_Resource_Font_Simple_Standard_Symbol Zend_Pdf_Resource_Font_Simple_Standard_TimesBold Zend_Pdf_Resource_Font_Simple_Standard_TimesBoldItalic Zend_Pdf_Resource_Font_Simple_Standard_TimesItalic Zend_Pdf_Resource_Font_Simple_Standard_TimesRoman Zend_Pdf_Resource_Font_Simple_Standard_ZapfDingbats

Public Member Functions

 __construct ($resource)
 
 __clone ()
 
 cloneResource ($factory, &$processed)
 
 getResource ()
 
 getFactory ()
 

Protected Attributes

 $_objectFactory
 
 $_resource
 

Detailed Description

Definition at line 30 of file Resource.php.

Constructor & Destructor Documentation

◆ __construct()

__construct (   $resource)

Object constructor.

If resource is not a Zend_Pdf_Element object, then stream object with specified value is generated.

Parameters
Zend_Pdf_Element | string$resource

Definition at line 67 of file Resource.php.

68  {
69  if ($resource instanceof Zend_Pdf_Element_Object) {
70  $this->_objectFactory = $resource->getFactory();
71  $this->_resource = $resource;
72 
73  return;
74  }
75 
76  #require_once 'Zend/Pdf/ElementFactory.php';
77 
78  $this->_objectFactory = Zend_Pdf_ElementFactory::createFactory(1);
79  if ($resource instanceof Zend_Pdf_Element) {
80  $this->_resource = $this->_objectFactory->newObject($resource);
81  } else {
82  $this->_resource = $this->_objectFactory->newStreamObject($resource);
83  }
84  }
$resource
Definition: bulk.php:12
static createFactory($objCount)

Member Function Documentation

◆ __clone()

__clone ( )

Clone page, extract it and dependent objects from the current document, so it can be used within other docs.

Todo:
implementation

Definition at line 90 of file Resource.php.

91  {
94 // $factory = Zend_Pdf_ElementFactory::createFactory(1);
95 // $processed = array();
96 //
97 // // Clone dictionary object.
98 // // Do it explicitly to prevent sharing resource attributes between different
99 // // results of clone operation (other resources are still shared)
100 // $dictionary = new Zend_Pdf_Element_Dictionary();
101 // foreach ($this->_pageDictionary->getKeys() as $key) {
102 // $dictionary->$key = $this->_pageDictionary->$key->makeClone($factory->getFactory(),
103 // $processed,
104 // Zend_Pdf_Element::CLONE_MODE_SKIP_PAGES);
105 // }
106 //
107 // $this->_pageDictionary = $factory->newObject($dictionary);
108 // $this->_objectFactory = $factory;
109 // $this->_attached = false;
110 // $this->_style = null;
111 // $this->_font = null;
112  }

◆ cloneResource()

cloneResource (   $factory,
$processed 
)

Clone resource, extract it and dependent objects from the current document, so it can be used within other docs.

Todo:
implementation

Definition at line 123 of file Resource.php.

124  {
127 // // Clone dictionary object.
128 // // Do it explicitly to prevent sharing page attributes between different
129 // // results of clonePage() operation (other resources are still shared)
130 // $dictionary = new Zend_Pdf_Element_Dictionary();
131 // foreach ($this->_pageDictionary->getKeys() as $key) {
132 // $dictionary->$key = $this->_pageDictionary->$key->makeClone($factory->getFactory(),
133 // $processed,
134 // Zend_Pdf_Element::CLONE_MODE_SKIP_PAGES);
135 // }
136 //
137 // $clonedPage = new Zend_Pdf_Page($factory->newObject($dictionary), $factory);
138 // $clonedPage->_attached = false;
139 //
140 // return $clonedPage;
141  }

◆ getFactory()

getFactory ( )

Get factory.

Definition at line 161 of file Resource.php.

162  {
163  return $this->_objectFactory;
164  }

◆ getResource()

getResource ( )

Get resource. Used to reference resource in an internal PDF data structures (resource dictionaries)

Definition at line 150 of file Resource.php.

151  {
152  return $this->_resource;
153  }

Field Documentation

◆ $_objectFactory

$_objectFactory
protected

Definition at line 50 of file Resource.php.

◆ $_resource

$_resource
protected

Definition at line 57 of file Resource.php.


The documentation for this class was generated from the following file: