Zend\Barcode\Barcode::factory
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 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.
Signature
public function factory(mixed
$barcode,
[mixed
$renderer = 'image',
[mixed
$barcodeConfig = true,
[mixed
$rendererConfig = true,
[bool
$automaticRenderError = true]]]] )
Parameters
$barcode
— mixed- String name of barcode class, or Traversable object.
$renderer
— string- String name of renderer class
$barcodeConfig
— array- OPTIONAL; an array or Traversable object with barcode parameters.
$rendererConfig
— array- OPTIONAL; an array or Traversable object with renderer parameters.
$automaticRenderError
— object- OPTIONAL; set the automatic rendering of exception
Returns
- Barcode