equal
deleted
inserted
replaced
12 * obtain it through the world-wide-web, please send an email |
12 * obtain it through the world-wide-web, please send an email |
13 * to license@zend.com so we can send you a copy immediately. |
13 * to license@zend.com so we can send you a copy immediately. |
14 * |
14 * |
15 * @category Zend |
15 * @category Zend |
16 * @package Zend_Barcode |
16 * @package Zend_Barcode |
17 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
17 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
18 * @license http://framework.zend.com/license/new-bsd New BSD License |
18 * @license http://framework.zend.com/license/new-bsd New BSD License |
19 * @version $Id: Barcode.php 20096 2010-01-06 02:05:09Z bkarwin $ |
19 * @version $Id: Barcode.php 24593 2012-01-05 20:35:02Z matthew $ |
20 */ |
20 */ |
21 |
21 |
22 /** |
22 /** |
23 * Class for generate Barcode |
23 * Class for generate Barcode |
24 * |
24 * |
25 * @category Zend |
25 * @category Zend |
26 * @package Zend_Barcode |
26 * @package Zend_Barcode |
27 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
27 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
28 * @license http://framework.zend.com/license/new-bsd New BSD License |
28 * @license http://framework.zend.com/license/new-bsd New BSD License |
29 */ |
29 */ |
30 class Zend_Barcode |
30 class Zend_Barcode |
31 { |
31 { |
32 /** |
32 /** |
53 * @param boolean $automaticRenderError OPTIONAL; set the automatic rendering of exception |
53 * @param boolean $automaticRenderError OPTIONAL; set the automatic rendering of exception |
54 * @return Zend_Barcode |
54 * @return Zend_Barcode |
55 * @throws Zend_Barcode_Exception |
55 * @throws Zend_Barcode_Exception |
56 */ |
56 */ |
57 public static function factory( |
57 public static function factory( |
58 $barcode, |
58 $barcode, |
59 $renderer = 'image', |
59 $renderer = 'image', |
60 $barcodeConfig = array(), |
60 $barcodeConfig = array(), |
61 $rendererConfig = array(), |
61 $rendererConfig = array(), |
62 $automaticRenderError = true |
62 $automaticRenderError = true |
63 ) { |
63 ) { |
64 /* |
64 /* |
65 * Convert Zend_Config argument to plain string |
65 * Convert Zend_Config argument to plain string |
66 * barcode name and separate config object. |
66 * barcode name and separate config object. |
311 * @param string | Zend_Barcode_Renderer $renderer |
311 * @param string | Zend_Barcode_Renderer $renderer |
312 * @param array | Zend_Config $barcodeConfig |
312 * @param array | Zend_Config $barcodeConfig |
313 * @param array | Zend_Config $rendererConfig |
313 * @param array | Zend_Config $rendererConfig |
314 */ |
314 */ |
315 public static function render( |
315 public static function render( |
316 $barcode, |
316 $barcode, |
317 $renderer, |
317 $renderer, |
318 $barcodeConfig = array(), |
318 $barcodeConfig = array(), |
319 $rendererConfig = array() |
319 $rendererConfig = array() |
320 ) { |
320 ) { |
321 self::factory($barcode, $renderer, $barcodeConfig, $rendererConfig)->render(); |
321 self::factory($barcode, $renderer, $barcodeConfig, $rendererConfig)->render(); |
322 } |
322 } |
323 |
323 |
329 * @param array | Zend_Config $barcodeConfig |
329 * @param array | Zend_Config $barcodeConfig |
330 * @param array | Zend_Config $rendererConfig |
330 * @param array | Zend_Config $rendererConfig |
331 * @return mixed |
331 * @return mixed |
332 */ |
332 */ |
333 public static function draw( |
333 public static function draw( |
334 $barcode, |
334 $barcode, |
335 $renderer, |
335 $renderer, |
336 $barcodeConfig = array(), |
336 $barcodeConfig = array(), |
337 $rendererConfig = array() |
337 $rendererConfig = array() |
338 ) { |
338 ) { |
339 return self::factory($barcode, $renderer, $barcodeConfig, $rendererConfig)->draw(); |
339 return self::factory($barcode, $renderer, $barcodeConfig, $rendererConfig)->draw(); |
340 } |
340 } |
341 |
341 |