3 * Zend Framework (http://framework.zend.com/)
5 * @link http://github.com/zendframework/zf2 for the canonical source repository
6 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
7 * @license http://framework.zend.com/license/new-bsd New BSD License
10 namespace Zend\Barcode\
Object;
13 * Class for generate Ean2 barcode
15 class Ean2
extends Ean5
17 protected $parities = array(
25 * Default options for Ean2 barcode
28 protected function getDefaultOptions()
30 $this->barcodeLength
= 2;
33 protected function getParity($i)
35 $modulo = $this->getText() %
4;
36 return $this->parities
[$modulo][$i];