source-class-Com.Tecnick.Barcode.Type.Linear.CodeOneTwoEight.C

It appears that you are using AdBlocking software. The cost of running this website is covered by advertisements. If you like it please feel free to a small amount of money to secure the future of this website.
Overview

Classes

Exceptions

 1: <?php
 2: /**
 3:  * C.php
 4:  *
 5:  * @since       2015-02-21
 6:  * @category    Library
 7:  * @package     Barcode
 8:  * @author      Nicola Asuni <info@tecnick.com>
 9:  * @copyright   2010-2016 Nicola Asuni - Tecnick.com LTD
10:  * @license     http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
11:  * @link        https://github.com/tecnickcom/tc-lib-barcode
12:  *
13:  * This file is part of tc-lib-barcode software library.
14:  */
15: 
16: namespace Com\Tecnick\Barcode\Type\Linear\CodeOneTwoEight;
17: 
18: use \Com\Tecnick\Barcode\Exception as BarcodeException;
19: 
20: /**
21:  * Com\Tecnick\Barcode\Type\Linear\CodeOneTwoEight\C;
22:  *
23:  * CodeOneTwoEightC Barcode type class
24:  * CODE 128 C
25:  *
26:  * @since       2015-02-21
27:  * @category    Library
28:  * @package     Barcode
29:  * @author      Nicola Asuni <info@tecnick.com>
30:  * @copyright   2010-2016 Nicola Asuni - Tecnick.com LTD
31:  * @license     http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
32:  * @link        https://github.com/tecnickcom/tc-lib-barcode
33:  */
34: class C extends \Com\Tecnick\Barcode\Type\Linear\CodeOneTwoEight
35: {
36:     /**
37:      * Barcode format
38:      *
39:      * @var string
40:      */
41:     protected $format = 'C128C';
42: 
43:     /**
44:      * Get the code point array
45:      *
46:      * @throws BarcodeException in case of error
47:      */
48:     protected function getCodeData()
49:     {
50:         $code = $this->code;
51:         // array of symbols
52:         $code_data = array();
53: 
54:         $startid = 105;
55:         if (ord($code[0]) == 241) {
56:             $code_data[] = 102;
57:             $code = substr($code, 1);
58:         }
59:         $this->getCodeDataC($code_data, $code);
60:         return $this->finalizeCodeData($code_data, $startid);
61:     }
62: }
63: 
 

© 2004-2017 – Nicola Asuni - Tecnick.com - All rights reserved.
about - disclaimer - privacy