PageRenderTime 788ms CodeModel.GetById 25ms RepoModel.GetById 4ms app.codeStats 1ms

/framework/vendor/zend/Zend/Pdf/Cmap/ByteEncoding/Static.php

http://zoop.googlecode.com/
PHP | 62 lines | 14 code | 7 blank | 41 comment | 1 complexity | 6ecb8ad9ce5c1c23ce9033c15050d379 MD5 | raw file
Possible License(s): BSD-3-Clause, LGPL-2.1
  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. * @category Zend
  16. * @package Zend_Pdf
  17. * @subpackage Fonts
  18. * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
  19. * @license http://framework.zend.com/license/new-bsd New BSD License
  20. * @version $Id: Static.php 20096 2010-01-06 02:05:09Z bkarwin $
  21. */
  22. /** Zend_Pdf_Cmap_ByteEncoding */
  23. require_once 'Zend/Pdf/Cmap/ByteEncoding.php';
  24. /**
  25. * Custom cmap type used for the Adobe Standard 14 PDF fonts.
  26. *
  27. * Just like {@link Zend_Pdf_Cmap_ByteEncoding} except that the constructor
  28. * takes a predefined array of glyph numbers and can cover any Unicode character.
  29. *
  30. * @package Zend_Pdf
  31. * @subpackage Fonts
  32. * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
  33. * @license http://framework.zend.com/license/new-bsd New BSD License
  34. */
  35. class Zend_Pdf_Cmap_ByteEncoding_Static extends Zend_Pdf_Cmap_ByteEncoding
  36. {
  37. /**** Public Interface ****/
  38. /* Object Lifecycle */
  39. /**
  40. * Object constructor
  41. *
  42. * @param array $cmapData Array whose keys are Unicode character codes and
  43. * values are glyph numbers.
  44. * @throws Zend_Pdf_Exception
  45. */
  46. public function __construct($cmapData)
  47. {
  48. if (! is_array($cmapData)) {
  49. require_once 'Zend/Pdf/Exception.php';
  50. throw new Zend_Pdf_Exception('Constructor parameter must be an array',
  51. Zend_Pdf_Exception::BAD_PARAMETER_TYPE);
  52. }
  53. $this->_glyphIndexArray = $cmapData;
  54. }
  55. }