Class for generate Barcode

category Zend
package Zend_Barcode

 Methods

Proxy to renderer draw() method

draw(string $barcode, string $renderer, array $barcodeConfig, array $rendererConfig) : mixed

Parameters

$barcode

string

| Object\ObjectInterface | array | Traversable $barcode

$renderer

string

| Renderer\RendererInterface $renderer

$barcodeConfig

array

| Traversable $barcodeConfig

$rendererConfig

array

| Traversable $rendererConfig

Returns

mixed

Factory for Zend_Barcode classes.

factory(mixed $barcode, mixed $renderer, mixed $barcodeConfig, mixed $rendererConfig, bool $automaticRenderError) : \Zend\Barcode\Barcode

First argument may be a string containing the base of the adapter class name, e.g. 'int25' corresponds to class Object\Int25. 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

$barcode

mixed

String name of barcode class, or Traversable object.

$renderer

mixed

String name of renderer class

$barcodeConfig

mixed

OPTIONAL; an array or Traversable object with barcode parameters.

$rendererConfig

mixed

OPTIONAL; an array or Traversable object with renderer parameters.

$automaticRenderError

bool

OPTIONAL; set the automatic rendering of exception

Exceptions

\Zend\Barcode\Exception\ExceptionInterface

Returns

Get current default font

getBarcodeFont() : string

Returns

string

Get the parser plugin manager

getObjectPluginManager() : \Zend\Barcode\ObjectPluginManager

Get the renderer plugin manager

getRendererPluginManager() : \Zend\Barcode\RendererPluginManager

Barcode Constructor

makeBarcode(mixed $barcode, mixed $barcodeConfig) : Object

Parameters

$barcode

mixed

String name of barcode class, or Traversable object, or barcode object.

$barcodeConfig

mixed

OPTIONAL; an array or Traversable object with barcode parameters.

Exceptions

\Zend\Barcode\Exception\InvalidArgumentException

Returns

Object

Renderer Constructor

makeRenderer(mixed $renderer, mixed $rendererConfig) : \Zend\Barcode\Renderer\RendererInterface

Parameters

$renderer

mixed

String name of renderer class, or Traversable object.

$rendererConfig

mixed

OPTIONAL; an array or Traversable object with renderer parameters.

Exceptions

\Zend\Barcode\Exception\RendererCreationException

Returns

Proxy to renderer render() method

render(string $barcode, string $renderer, array $barcodeConfig, array $rendererConfig) 

Parameters

$barcode

string

| Object\ObjectInterface | array | Traversable $barcode

$renderer

string

| Renderer\RendererInterface $renderer

$barcodeConfig

array

| Traversable $barcodeConfig

$rendererConfig

array

| Traversable $rendererConfig

Set the default font for new instances of barcode

setBarcodeFont(string $font) : void

Parameters

$font

string

 Properties

 

The parser plugin manager

$objectPlugins : \Zend\Barcode\ObjectPluginManager

 

The renderer plugin manager

$rendererPlugins : \Zend\Barcode\RendererPluginManager

 

Default barcode TTF font name

$staticFont : string

It's used by standard barcode objects derived from Object\AbstractObject class if corresponding constructor option is not provided.