Source of file Ean2.php
Size: 0,870 Bytes - Last Modified: 2014-03-12T23:21:18+01:00
/home/theseer/Downloads/ZendFramework-2.3.0/library/Zend/Barcode/Object/Ean2.php
12345678910111213141516171819202122232425262728293031323334353637383940 | <?php /** * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ namespace Zend\Barcode\Object; /** * Class for generate Ean2 barcode */ class Ean2 extends Ean5 { protected $parities = array( 0 => array('A','A'), 1 => array('A','B'), 2 => array('B','A'), 3 => array('B','B') ); /** * Default options for Ean2 barcode * @return void */ protected function getDefaultOptions() { $this->barcodeLength = 2; } protected function getParity($i) { $modulo = $this->getText() % 4; return $this->parities[$modulo][$i]; } } |