File indexing completed on 2024-12-29 05:27:53

0001 <?php
0002 /**
0003  * Zend Framework
0004  *
0005  * LICENSE
0006  *
0007  * This source file is subject to the new BSD license that is bundled
0008  * with this package in the file LICENSE.txt.
0009  * It is also available through the world-wide-web at this URL:
0010  * http://framework.zend.com/license/new-bsd
0011  * If you did not receive a copy of the license and are unable to
0012  * obtain it through the world-wide-web, please send an email
0013  * to license@zend.com so we can send you a copy immediately.
0014  *
0015  * @category   Zend
0016  * @package    Zend_Pdf
0017  * @subpackage Fonts
0018  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
0019  * @license    http://framework.zend.com/license/new-bsd     New BSD License
0020  * @version    $Id$
0021  */
0022 
0023 /** Zend_Pdf_Cmap_ByteEncoding */
0024 // require_once 'Zend/Pdf/Cmap/ByteEncoding.php';
0025 
0026 
0027 /**
0028  * Custom cmap type used for the Adobe Standard 14 PDF fonts.
0029  *
0030  * Just like {@link Zend_Pdf_Cmap_ByteEncoding} except that the constructor
0031  * takes a predefined array of glyph numbers and can cover any Unicode character.
0032  *
0033  * @package    Zend_Pdf
0034  * @subpackage Fonts
0035  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
0036  * @license    http://framework.zend.com/license/new-bsd     New BSD License
0037  */
0038 class Zend_Pdf_Cmap_ByteEncoding_Static extends Zend_Pdf_Cmap_ByteEncoding
0039 {
0040   /**** Public Interface ****/
0041 
0042 
0043   /* Object Lifecycle */
0044 
0045     /**
0046      * Object constructor
0047      *
0048      * @param array $cmapData Array whose keys are Unicode character codes and
0049      *   values are glyph numbers.
0050      * @throws Zend_Pdf_Exception
0051      */
0052     public function __construct($cmapData)
0053     {
0054         if (! is_array($cmapData)) {
0055             // require_once 'Zend/Pdf/Exception.php';
0056             throw new Zend_Pdf_Exception('Constructor parameter must be an array',
0057                                          Zend_Pdf_Exception::BAD_PARAMETER_TYPE);
0058         }
0059         $this->_glyphIndexArray = $cmapData;
0060     }
0061 
0062 }