1: <?php
2: /**
3: * KlantIndex.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;
17:
18: use \Com\Tecnick\Barcode\Exception as BarcodeException;
19:
20: /**
21: * Com\Tecnick\Barcode\Type\Linear\KlantIndex;
22: *
23: * KlantIndex Barcode type class
24: * KIX (Klant index - Customer index)
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 KlantIndex extends \Com\Tecnick\Barcode\Type\Linear\RoyalMailFourCc
35: {
36: /**
37: * Barcode format
38: *
39: * @var string
40: */
41: protected $format = 'KIX';
42:
43: /**
44: * Format code
45: */
46: protected function formatCode()
47: {
48: $this->extcode = strtoupper($this->code);
49: }
50:
51: /**
52: * Get the bars array
53: *
54: * @throws BarcodeException in case of error
55: */
56: protected function setBars()
57: {
58: $this->ncols = 0;
59: $this->nrows = 3;
60: $this->bars = array();
61: $this->getCoreBars();
62: }
63: }
64: