Class for generate Barcode

package Default

 Methods

Proxy to renderer draw() method

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

Parameters

$barcode

$renderer

$barcodeConfig

$rendererConfig

Returns

mixed

Factory for Zend\Barcode classes.

factory(mixed $barcode, mixed $renderer = 'image', mixed $barcodeConfig = array(), mixed $rendererConfig = array(), boolean $automaticRenderError = true) : \Zend\Barcode\Renderer\RendererInterface
Static

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

boolean

OPTIONAL; set the automatic rendering of exception

Exceptions

\Zend\Barcode\Exception\ExceptionInterface

Returns

\Zend\Barcode\Renderer\RendererInterface

Get current default font

getBarcodeFont() : string
Static

Returns

string

Get the parser plugin manager

getObjectPluginManager() : \Zend\Barcode\ObjectPluginManager
Static

Returns

\Zend\Barcode\ObjectPluginManager

Get the renderer plugin manager

getRendererPluginManager() : \Zend\Barcode\RendererPluginManager
Static

Returns

\Zend\Barcode\RendererPluginManager

Barcode Constructor

makeBarcode(mixed $barcode, mixed $barcodeConfig = array()) : \Zend\Barcode\Object\ObjectInterface
Static

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

\Zend\Barcode\Object\ObjectInterface

Renderer Constructor

makeRenderer(mixed $renderer = 'image', mixed $rendererConfig = array()) : \Zend\Barcode\Renderer\RendererInterface
Static

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

\Zend\Barcode\Renderer\RendererInterface

Proxy to renderer render() method

render($barcode, $renderer, $barcodeConfig = array(), $rendererConfig = array()
Static

Parameters

$barcode

$renderer

$barcodeConfig

$rendererConfig

Set the default font for new instances of barcode

setBarcodeFont(string $font) : void
Static

Parameters

$font

string

 Properties

 

The parser plugin manager

$objectPlugins : \Zend\Barcode\ObjectPluginManager

Default

Static
 

The renderer plugin manager

$rendererPlugins : \Zend\Barcode\RendererPluginManager

Default

Static
 

Default barcode TTF font name

$staticFont : string

Default

null
Static

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