Barcode.php
Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to [email protected] so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Barcode
- Version
- $Id: Barcode.php 24593 2012-01-05 20:35:02Z matthew $
\Zend_Barcode
Class for generate Barcode
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Methods


draw(string $barcode, string $renderer, array $barcodeConfig = array(), array $rendererConfig = array()) : mixed
Proxy to renderer draw() method
Name | Type | Description |
---|---|---|
$barcode | string | | Zend_Barcode_Object | array | Zend_Config $barcode |
$renderer | string | | Zend_Barcode_Renderer $renderer |
$barcodeConfig | array | | Zend_Config $barcodeConfig |
$rendererConfig | array | | Zend_Config $rendererConfig |
Type | Description |
---|---|
mixed |


factory(mixed $barcode, mixed $renderer = 'image', mixed $barcodeConfig = array(), mixed $rendererConfig = array(), boolean $automaticRenderError = true) : \Zend_Barcode
Factory for Zend_Barcode classes.
First argument may be a string containing the base of the adapter class name, e.g. 'int25' corresponds to class Zend_Barcode_Object_Int25. This is case-insensitive.
First argument may alternatively be an object of type Zend_Config. The barcode class base name is read from the 'barcode' property. The barcode config parameters are read from the 'params' property.
Second argument is optional and may be an associative array of key-value pairs. This is used as the argument to the barcode constructor.
If the first argument is of type Zend_Config, it is assumed to contain all parameters, and the second argument is ignored.
Name | Type | Description |
---|---|---|
$barcode | mixed | String name of barcode class, or Zend_Config object. |
$renderer | mixed | String name of renderer class |
$barcodeConfig | mixed | OPTIONAL; an array or Zend_Config object with barcode parameters. |
$rendererConfig | mixed | OPTIONAL; an array or Zend_Config object with renderer parameters. |
$automaticRenderError | boolean | OPTIONAL; set the automatic rendering of exception |
Type | Description |
---|---|
\Zend_Barcode |
Exception | Description |
---|---|
\Zend_Barcode_Exception |


makeBarcode(mixed $barcode, mixed $barcodeConfig = array()) : \Zend_Barcode_Object
Barcode Constructor
Name | Type | Description |
---|---|---|
$barcode | mixed | String name of barcode class, or Zend_Config object. |
$barcodeConfig | mixed | OPTIONAL; an array or Zend_Config object with barcode parameters. |
Type | Description |
---|---|
\Zend_Barcode_Object |


makeRenderer(mixed $renderer = 'image', mixed $rendererConfig = array()) : \Zend_Barcode_Renderer
Renderer Constructor
Name | Type | Description |
---|---|---|
$renderer | mixed | String name of renderer class, or Zend_Config object. |
$rendererConfig | mixed | OPTIONAL; an array or Zend_Config object with renderer parameters. |
Type | Description |
---|---|
\Zend_Barcode_Renderer |


render(string $barcode, string $renderer, array $barcodeConfig = array(), array $rendererConfig = array()) : void
Proxy to renderer render() method
Name | Type | Description |
---|---|---|
$barcode | string | | Zend_Barcode_Object | array | Zend_Config $barcode |
$renderer | string | | Zend_Barcode_Renderer $renderer |
$barcodeConfig | array | | Zend_Config $barcodeConfig |
$rendererConfig | array | | Zend_Config $rendererConfig |