Class for rendering the barcode

package Default

 Methods

Constructor

__construct(array|\Traversable $options = null
inherited_from \Zend\Barcode\Renderer\RendererInterface::__construct()

Parameters

$options

array\Traversable

Checking of parameters after all settings

checkParams() : boolean
inherited_from \Zend\Barcode\Renderer\RendererInterface::checkParams()

Returns

boolean

Draw the barcode in the rendering resource

draw() : mixed
inherited_from \Zend\Barcode\Renderer\RendererInterface::draw()

Exceptions

\Zend\Barcode\Exception\ExceptionInterface

Returns

mixed

Retrieve the automatic rendering of exception

getAutomaticRenderError() : boolean
inherited_from \Zend\Barcode\Renderer\RendererInterface::getAutomaticRenderError()

Returns

boolean

Retrieve the barcode object

getBarcode() : \Zend\Barcode\Object\ObjectInterface
inherited_from \Zend\Barcode\Renderer\RendererInterface::getBarcode()

Returns

\Zend\Barcode\Object\ObjectInterface

Horizontal position of the barcode in the rendering resource

getHorizontalPosition() : string
inherited_from \Zend\Barcode\Renderer\RendererInterface::getHorizontalPosition()

Returns

string

Retrieve vertical adjustment

getLeftOffset() : integer
inherited_from \Zend\Barcode\Renderer\RendererInterface::getLeftOffset()

Returns

integer

Set the size of a module

getModuleSize() : float
inherited_from \Zend\Barcode\Renderer\RendererInterface::getModuleSize()

Returns

float

Retrieve renderer namespace

getRendererNamespace() : string
inherited_from \Zend\Barcode\Renderer\RendererInterface::getRendererNamespace()

Returns

string

Retrieve vertical adjustment

getTopOffset() : integer
inherited_from \Zend\Barcode\Renderer\RendererInterface::getTopOffset()

Returns

integer

getTransparentBackground()

getTransparentBackground() : boolean

Returns

boolean

Retrieve renderer type

getType() : string
inherited_from \Zend\Barcode\Renderer\RendererInterface::getType()

Returns

string

Vertical position of the barcode in the rendering resource

getVerticalPosition() : string
inherited_from \Zend\Barcode\Renderer\RendererInterface::getVerticalPosition()

Returns

string

Activate/Deactivate the automatic rendering of exception

setAutomaticRenderError(boolean $value) : \Zend\Barcode\Renderer\AbstractRenderer
inherited_from \Zend\Barcode\Renderer\RendererInterface::setAutomaticRenderError()

Parameters

$value

boolean

Returns

\Zend\Barcode\Renderer\AbstractRenderer

Set the barcode object

setBarcode(\Zend\Barcode\Object\ObjectInterface $barcode) : \Zend\Barcode\Renderer\AbstractRenderer
inherited_from \Zend\Barcode\Renderer\RendererInterface::setBarcode()

Parameters

$barcode

\Zend\Barcode\Object\ObjectInterface

Returns

\Zend\Barcode\Renderer\AbstractRenderer

Horizontal position of the barcode in the rendering resource

setHorizontalPosition(string $value) : \Zend\Barcode\Renderer\AbstractRenderer
inherited_from \Zend\Barcode\Renderer\RendererInterface::setHorizontalPosition()

Parameters

$value

string

Exceptions

\Zend\Barcode\Renderer\Exception\UnexpectedValueException

Returns

\Zend\Barcode\Renderer\AbstractRenderer

Manually adjust left position

setLeftOffset(integer $value) : \Zend\Barcode\Renderer\AbstractRenderer
inherited_from \Zend\Barcode\Renderer\RendererInterface::setLeftOffset()

Parameters

$value

integer

Exceptions

\Zend\Barcode\Renderer\Exception\OutOfRangeException

Returns

\Zend\Barcode\Renderer\AbstractRenderer

Set the size of a module

setModuleSize(float $value) : \Zend\Barcode\Renderer\AbstractRenderer
inherited_from \Zend\Barcode\Renderer\RendererInterface::setModuleSize()

Parameters

$value

float

Exceptions

\Zend\Barcode\Renderer\Exception\OutOfRangeException

Returns

\Zend\Barcode\Renderer\AbstractRenderer

Set renderer state from options array

setOptions(array $options) : \Zend\Barcode\Renderer\AbstractRenderer
inherited_from \Zend\Barcode\Renderer\RendererInterface::setOptions()

Parameters

$options

array

Returns

\Zend\Barcode\Renderer\AbstractRenderer

Set renderer namespace for autoloading

setRendererNamespace(string $namespace) : \Zend\Barcode\Renderer\AbstractRenderer
inherited_from \Zend\Barcode\Renderer\RendererInterface::setRendererNamespace()

Parameters

$namespace

string

Returns

\Zend\Barcode\Renderer\AbstractRenderer

Manually adjust top position

setTopOffset(integer $value) : \Zend\Barcode\Renderer\AbstractRenderer
inherited_from \Zend\Barcode\Renderer\RendererInterface::setTopOffset()

Parameters

$value

integer

Exceptions

\Zend\Barcode\Renderer\Exception\OutOfRangeException

Returns

\Zend\Barcode\Renderer\AbstractRenderer

Set whether background should be transparent Will work for SVG and Image (png and gif only)

setTransparentBackground($bool) : \Zend\Barcode\Renderer\AbstractRenderer
fluent This method is part of a fluent interface and will return the same instance

Parameters

$bool

Returns

\Zend\Barcode\Renderer\AbstractRenderer

Vertical position of the barcode in the rendering resource

setVerticalPosition(string $value) : \Zend\Barcode\Renderer\AbstractRenderer
inherited_from \Zend\Barcode\Renderer\RendererInterface::setVerticalPosition()

Parameters

$value

string

Exceptions

\Zend\Barcode\Renderer\Exception\UnexpectedValueException

Returns

\Zend\Barcode\Renderer\AbstractRenderer

Calculate the left and top offset of the barcode in the rendering support

adjustPosition(float $supportHeight, float $supportWidth) : void

Parameters

$supportHeight

float

$supportWidth

float

Check if a barcode object is correctly provided

checkBarcodeObject() : void

Exceptions

\Zend\Barcode\Renderer\Exception\RuntimeException

Checking of parameters after all settings

checkSpecificParams() : void

Draw a polygon in the rendering resource

drawPolygon(array $points, integer $color, boolean $filled = true

Parameters

$points

array

$color

integer

$filled

boolean

Draw a polygon in the rendering resource

drawText(string $text, float $size, array $position, string $font, integer $color, string $alignment = 'center', float|integer $orientation = 0

Parameters

$text

string

$size

float

$position

array

$font

string

$color

integer

$alignment

string

$orientation

floatinteger

Initialize the rendering resource

initRenderer() : void

Sub process to draw the barcode instructions Needed by the automatic error rendering

drawInstructionList() 

 Properties

 

Activate/Deactivate the automatic rendering of exception

$automaticRenderError : boolean

Default

false
 

Barcode object

$barcode : \Zend\Barcode\Object\ObjectInterface

Default

 

Horizontal position of the barcode in the rendering resource

$horizontalPosition : string

Default

'left'
 

Offset of the barcode from the left of the rendering resource

$leftOffset : integer

Default

0
 

Module size rendering

$moduleSize : float

Default

1
 

Namespace of the renderer for autoloading

$rendererNamespace : string

Default

'Zend\Barcode\Renderer'
 

Drawing resource

$resource 

Default

 

Offset of the barcode from the top of the rendering resource

$topOffset : integer

Default

0
 

Show a transparent background

$transparentBackground : Boolean

Default

false
 

Renderer type

$type : string

Default

null
 

Vertical position of the barcode in the rendering resource

$verticalPosition : string

Default

'top'