Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Keeper.php
Go to the documentation of this file.
1 <?php
24 #require_once 'Zend/Pdf/Trailer.php';
25 
35 {
41  private $_context;
42 
48  private $_prev;
49 
50 
60  Zend_Pdf_Trailer $prev = null)
61  {
62  parent::__construct($dict);
63 
64  $this->_context = $context;
65  $this->_prev = $prev;
66  }
67 
73  public function setPrev(Zend_Pdf_Trailer_Keeper $prev)
74  {
75  $this->_prev = $prev;
76  }
77 
83  public function getPrev()
84  {
85  return $this->_prev;
86  }
87 
93  public function getPDFLength()
94  {
95  return $this->_context->getParser()->getLength();
96  }
97 
103  public function getPDFString()
104  {
105  return $this->_context->getParser()->getString();
106  }
107 
114  public function getRefTable()
115  {
116  return $this->_context->getRefTable();
117  }
118 
126  public function getLastFreeObject()
127  {
128  try {
129  $this->_context->getRefTable()->getNextFree('0 65535 R');
130  } catch (Zend_Pdf_Exception $e) {
131  if ($e->getMessage() == 'Object not found.') {
137  return 0;
138  }
139 
140  throw new Zend_Pdf_Exception($e->getMessage(), $e->getCode(), $e);
141  }
142  }
143 }
__construct(Zend_Pdf_Element_Dictionary $dict, Zend_Pdf_Element_Reference_Context $context, Zend_Pdf_Trailer $prev=null)
Definition: Keeper.php:58
setPrev(Zend_Pdf_Trailer_Keeper $prev)
Definition: Keeper.php:73