2
0

Stream.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. /**
  3. * Zend Framework
  4. *
  5. * LICENSE
  6. *
  7. * This source file is subject to the new BSD license that is bundled
  8. * with this package in the file LICENSE.txt.
  9. * It is also available through the world-wide-web at this URL:
  10. * http://framework.zend.com/license/new-bsd
  11. * If you did not receive a copy of the license and are unable to
  12. * obtain it through the world-wide-web, please send an email
  13. * to license@zend.com so we can send you a copy immediately.
  14. *
  15. * @package Zend_Pdf
  16. * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
  17. * @license http://framework.zend.com/license/new-bsd New BSD License
  18. */
  19. /** Zend_Pdf_Parser */
  20. require_once 'Zend/Pdf/Parser.php';
  21. /**
  22. * PDF object stream parser
  23. *
  24. * @package Zend_Pdf
  25. * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
  26. * @license http://framework.zend.com/license/new-bsd New BSD License
  27. */
  28. class Zend_Pdf_Parser_Stream extends Zend_Pdf_Parser
  29. {
  30. /**
  31. * Get Trailer object
  32. *
  33. * @return Zend_Pdf_Trailer_Keeper
  34. */
  35. public function getTrailer()
  36. {
  37. throw new Zend_Pdf_Exception('Stream object parser doesn\'t contain trailer information.');
  38. }
  39. /**
  40. * Object constructor
  41. *
  42. * @param string $pdfString
  43. * @param Zend_Pdf_ElementFactory $factory
  44. * @throws Zend_Exception
  45. */
  46. public function __construct(&$source, Zend_Pdf_ElementFactory $factory)
  47. {
  48. $this->_current = 0;
  49. $this->_currentContext = null;
  50. $this->_contextStack = array();
  51. $this->_elements = new Zend_Pdf_PhpArray();
  52. $this->_objFactory = $factory;
  53. }
  54. }