Class for generate Barcode.
More...
|
static | getObjectPluginManager () |
| Get the parser plugin manager.
|
|
static | getRendererPluginManager () |
| Get the renderer plugin manager.
|
|
static | factory ($barcode, $renderer= 'image', $barcodeConfig=[], $rendererConfig=[], $automaticRenderError=true) |
| Factory for Zend classes.
|
|
static | makeBarcode ($barcode, $barcodeConfig=[]) |
| Barcode Constructor.
|
|
static | makeRenderer ($renderer= 'image', $rendererConfig=[]) |
| Renderer Constructor.
|
|
static | render ($barcode, $renderer, $barcodeConfig=[], $rendererConfig=[]) |
| Proxy to renderer render() method.
|
|
static | draw ($barcode, $renderer, $barcodeConfig=[], $rendererConfig=[]) |
| Proxy to renderer draw() method.
|
|
static | setBarcodeFont ($font) |
| Set the default font for new instances of barcode.
|
|
static | getBarcodeFont () |
| Get current default font.
|
|
Class for generate Barcode.
static draw |
( |
|
$barcode, |
|
|
|
$renderer, |
|
|
|
$barcodeConfig = [] , |
|
|
|
$rendererConfig = [] |
|
) |
| |
|
static |
Proxy to renderer draw() method.
- Parameters
-
string | Object\ObjectInterface | array | Traversable | $barcode | |
string | Renderer\RendererInterface | $renderer | |
array | Traversable | $barcodeConfig | |
array | Traversable | $rendererConfig | |
- Returns
- mixed
static factory |
( |
|
$barcode, |
|
|
|
$renderer = 'image' , |
|
|
|
$barcodeConfig = [] , |
|
|
|
$rendererConfig = [] , |
|
|
|
$automaticRenderError = true |
|
) |
| |
|
static |
Factory for Zend classes.
First argument may be a string containing the base of the adapter class name, e.g. 'code25' corresponds to class Object. This is case-insensitive.
First argument may alternatively be an object of type Traversable. 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 Traversable, it is assumed to contain all parameters, and the second argument is ignored.
- Parameters
-
mixed | $barcode | String name of barcode class, or Traversable object. |
mixed | $renderer | String name of renderer class |
mixed | $barcodeConfig | OPTIONAL; an array or Traversable object with barcode parameters. |
mixed | $rendererConfig | OPTIONAL; an array or Traversable object with renderer parameters. |
bool | $automaticRenderError | OPTIONAL; set the automatic rendering of exception |
- Returns
- RendererInterface
- Exceptions
-
Exception\ExceptionInterface | |
static getBarcodeFont |
( |
| ) |
|
|
static |
Get current default font.
- Returns
- string
static getObjectPluginManager |
( |
| ) |
|
|
static |
static getRendererPluginManager |
( |
| ) |
|
|
static |
static makeBarcode |
( |
|
$barcode, |
|
|
|
$barcodeConfig = [] |
|
) |
| |
|
static |
Barcode Constructor.
- Parameters
-
mixed | $barcode | String name of barcode class, or Traversable object, or barcode object. |
mixed | $barcodeConfig | OPTIONAL; an array or Traversable object with barcode parameters. |
- Exceptions
-
Exception\InvalidArgumentException | |
- Returns
- Object
static makeRenderer |
( |
|
$renderer = 'image' , |
|
|
|
$rendererConfig = [] |
|
) |
| |
|
static |
Renderer Constructor.
- Parameters
-
mixed | $renderer | String name of renderer class, or Traversable object. |
mixed | $rendererConfig | OPTIONAL; an array or Traversable object with renderer parameters. |
- Exceptions
-
Exception\RendererCreationException | |
- Returns
- Renderer
static render |
( |
|
$barcode, |
|
|
|
$renderer, |
|
|
|
$barcodeConfig = [] , |
|
|
|
$rendererConfig = [] |
|
) |
| |
|
static |
Proxy to renderer render() method.
- Parameters
-
string | Object\ObjectInterface | array | Traversable | $barcode | |
string | Renderer\RendererInterface | $renderer | |
array | Traversable | $barcodeConfig | |
array | Traversable | $rendererConfig | |
static setBarcodeFont |
( |
|
$font | ) |
|
|
static |
Set the default font for new instances of barcode.
- Parameters
-
- Returns
- void