diff -r 000000000000 -r 4eba9c11703f web/Zend/Pdf/Resource/ContentStream.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/Zend/Pdf/Resource/ContentStream.php Mon Dec 13 18:29:26 2010 +0100 @@ -0,0 +1,114 @@ +_bufferedContent .= $instructions; + return $this; + } + + /** + * Get current stream content + * + * @return string + */ + public function getInstructions() + { + $this->flush(); + return $this->_resource->value; + } + + /** + * Clear stream content. + * + * @return Zend_Pdf_Resource_ContentStream + */ + public function clear() + { + $this->_resource->value = ''; + $this->_bufferedContent = ''; + return $this; + } + + /** + * Flush buffered content + */ + public function flush() + { + $this->_resource->value .= $this->_bufferedContent; + $this->_bufferedContent = ''; + + return $this; + } +}