Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Trailer.php
Go to the documentation of this file.
1 <?php
30 abstract class Zend_Pdf_Trailer
31 {
32  private static $_allowedKeys = array('Size', 'Prev', 'Root', 'Encrypt', 'Info', 'ID', 'Index', 'W', 'XRefStm', 'DocChecksum');
33 
39  private $_dict;
40 
47  private function _checkDictKey($key)
48  {
49  if ( !in_array($key, self::$_allowedKeys) ) {
51  #require_once 'Zend/Pdf/Exception.php';
52  throw new Zend_Pdf_Exception("Unknown trailer dictionary key: '$key'.");
53  }
54  }
55 
56 
63  {
64  $this->_dict = $dict;
65 
66  foreach ($this->_dict->getKeys() as $dictKey) {
67  $this->_checkDictKey($dictKey);
68  }
69  }
70 
77  public function __get($property)
78  {
79  return $this->_dict->$property;
80  }
81 
88  public function __set($property, $value)
89  {
90  $this->_checkDictKey($property);
91  $this->_dict->$property = $value;
92  }
93 
99  public function toString()
100  {
101  return "trailer\n" . $this->_dict->toString() . "\n";
102  }
103 
104 
110  abstract public function getPDFLength();
111 
117  abstract public function getPDFString();
118 
125  abstract public function getLastFreeObject();
126 }
__set($property, $value)
Definition: Trailer.php:88
$value
Definition: gender.phtml:16
__construct(Zend_Pdf_Element_Dictionary $dict)
Definition: Trailer.php:62
__get($property)
Definition: Trailer.php:77