Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Stream.php
Go to the documentation of this file.
1 <?php
24 #require_once 'Zend/Pdf.php';
25 
26 
28 #require_once 'Zend/Pdf/Element.php';
29 
39 {
45  public $value;
46 
47 
53  public function __construct($val)
54  {
55  $this->value = Zend_Pdf::getMemoryManager()->create($val);
56  }
57 
58 
64  public function getType()
65  {
67  }
68 
69 
76  public function length()
77  {
78  return strlen($this->value->getRef());
79  }
80 
81 
86  public function clear()
87  {
88  $ref = &$this->value->getRef();
89  $ref = '';
90  $this->value->touch();
91  }
92 
93 
99  public function append($val)
100  {
101  $ref = &$this->value->getRef();
102  $ref .= (string)$val;
103  $this->value->touch();
104  }
105 
106 
115  public function makeClone(Zend_Pdf_ElementFactory $factory, array &$processed, $mode)
116  {
117  return new self($this->value->getRef());
118  }
119 
126  public function toString($factory = null)
127  {
128  return "stream\n" . $this->value->getRef() . "\nendstream";
129  }
130 }
const TYPE_STREAM
Definition: Element.php:38
$block setTitle( 'CMS Block Title') -> setIdentifier('fixture_block') ->setContent('< h1 >Fixture Block Title</h1 >< a href=" store url</a><p> Config value
Definition: block.php:9
makeClone(Zend_Pdf_ElementFactory $factory, array &$processed, $mode)
Definition: Stream.php:115
toString($factory=null)
Definition: Stream.php:126
if($exist=($block->getProductCollection() && $block->getProductCollection() ->getSize())) $mode
Definition: grid.phtml:15
static getMemoryManager()
Definition: Pdf.php:236