Class for rendering the barcode as svg

category Zend
package Zend_Barcode
copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License
inherited_from \Zend_Barcode_Renderer_RendererAbstract

 Methods

Constructor

__construct(array|\Zend_Config $options = null) : \Zend_Barcode_Renderer_RendererAbstract
Inherited

Parameters

$options

array\Zend_Config

Returns

\Zend_Barcode_Renderer_RendererAbstract

Checking of parameters after all settings

checkParams() : boolean
Inherited

Returns

boolean

Draw the barcode in the rendering resource

draw() : mixed
inherited_from \Zend_Barcode_Renderer_RendererAbstract::draw()

Returns

mixed

Draw the barcode in the rendering resource

draw() : mixed
Inherited

Exceptions

\Zend_Exception
\Zend_Barcode_Exception

Returns

mixed

Retrieve the automatic rendering of exception

getAutomaticRenderError() : boolean
Inherited

Returns

boolean

Retrieve the barcode object

getBarcode() : \Zend_Barcode_Object
Inherited

Returns

\Zend_Barcode_Object

Get barcode height

getHeight() : integer

Returns

integer

Horizontal position of the barcode in the rendering resource

getHorizontalPosition() : string
Inherited

Returns

string

Retrieve vertical adjustment

getLeftOffset() : integer
Inherited

Returns

integer

Set the size of a module

getModuleSize() : float
Inherited

Returns

float

Retrieve renderer namespace

getRendererNamespace() : string
Inherited

Returns

string

Retrieve vertical adjustment

getTopOffset() : integer
Inherited

Returns

integer

Retrieve renderer type

getType() : string
Inherited

Returns

string

Vertical position of the barcode in the rendering resource

getVerticalPosition() : string
Inherited

Returns

string

Get barcode width

getWidth() : integer

Returns

integer

Draw and render the barcode with correct headers

render() : mixed
inherited_from \Zend_Barcode_Renderer_RendererAbstract::render()

Returns

mixed

Render the resource by sending headers and drawed resource

render() : mixed
Inherited

Returns

mixed

Activate/Deactivate the automatic rendering of exception

setAutomaticRenderError(boolean $value) : \Zend_Barcode_Renderer_Svg
Inherited
fluent This method is part of a fluent interface and will return the same instance

Parameters

$value

boolean

Returns

\Zend_Barcode_Renderer_Svg

Set the barcode object

setBarcode(\Zend_Barcode_Object $barcode) : \Zend_Barcode_Renderer
Inherited

Parameters

$barcode

\Zend_Barcode_Object

Exceptions

\Zend_Barcode_Renderer_Exception

Returns

\Zend_Barcode_Renderer

Set renderer state from config object

setConfig(\Zend_Config $config) : \Zend_Renderer_Object
Inherited

Parameters

$config

\Zend_Config

Returns

\Zend_Renderer_Object

Set height of the result image

setHeight(null|integer $value) : \Zend_Image_Barcode_Abstract

Parameters

$value

nullinteger

Exceptions

\Zend_Barcode_Renderer_Exception

Returns

\Zend_Image_Barcode_Abstract

Horizontal position of the barcode in the rendering resource

setHorizontalPosition(string $value) : \Zend_Barcode_Renderer
Inherited

Parameters

$value

string

Exceptions

\Zend_Barcode_Renderer_Exception

Returns

\Zend_Barcode_Renderer

Manually adjust left position

setLeftOffset(integer $value) : \Zend_Barcode_Renderer
Inherited

Parameters

$value

integer

Exceptions

\Zend_Barcode_Renderer_Exception

Returns

\Zend_Barcode_Renderer

Set the size of a module

setModuleSize(float $value) : \Zend_Barcode_Renderer
Inherited

Parameters

$value

float

Exceptions

\Zend_Barcode_Renderer_Exception

Returns

\Zend_Barcode_Renderer

Set renderer state from options array

setOptions(array $options) : \Zend_Renderer_Object
Inherited

Parameters

$options

array

Returns

\Zend_Renderer_Object

Set renderer namespace for autoloading

setRendererNamespace(string $namespace) : \Zend_Renderer_Object
Inherited

Parameters

$namespace

string

Returns

\Zend_Renderer_Object

Set an image resource to draw the barcode inside

setResource($svg) : \Zend_Barcode_Renderer

Parameters

$svg

Exceptions

\Zend_Barcode_Renderer_Exception

Returns

\Zend_Barcode_Renderer

Manually adjust top position

setTopOffset(integer $value) : \Zend_Barcode_Renderer
Inherited

Parameters

$value

integer

Exceptions

\Zend_Barcode_Renderer_Exception

Returns

\Zend_Barcode_Renderer

Vertical position of the barcode in the rendering resource

setVerticalPosition(string $value) : \Zend_Barcode_Renderer_Svg
Inherited
fluent This method is part of a fluent interface and will return the same instance

Parameters

$value

string

Exceptions

\Zend_Barcode_Renderer_Exception

Returns

\Zend_Barcode_Renderer_Svg

Set barcode width

setWidth(mixed $value) : \Zend_Barcode_Renderer_Svg
fluent This method is part of a fluent interface and will return the same instance

Parameters

$value

mixed

Exceptions

\Zend_Barcode_Renderer_Exception

Returns

\Zend_Barcode_Renderer_Svg

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

_adjustPosition(float $supportHeight, float $supportWidth) : void
Inherited

Parameters

$supportHeight

float

$supportWidth

float

Append a new DOMElement to the root element

_appendRootElement(string $tagName, array $attributes = array(), string $textContent = null

Parameters

$tagName

string

$attributes

array

$textContent

string

Check if a barcode object is correctly provided

_checkBarcodeObject() : void
Inherited

Exceptions

\Zend_Barcode_Renderer_Exception

Check barcode dimensions

_checkDimensions() : void

Exceptions

\Zend_Barcode_Renderer_Exception

Check barcode parameters

_checkParams() : void
inherited_from \Zend_Barcode_Renderer_RendererAbstract::_checkParams()

Checking of parameters after all settings

_checkParams() : void
Inherited

Create DOMElement

_createElement(string $tagName, array $attributes = array(), string $textContent = null) : \DOMElement

Parameters

$tagName

string

$attributes

array

$textContent

string

Returns

\DOMElement

Draw a polygon in the svg resource

_drawPolygon(array $points, integer $color, boolean $filled = true
inherited_from \Zend_Barcode_Renderer_RendererAbstract::_drawPolygon()

Parameters

$points

array

$color

integer

$filled

boolean

Draw a polygon in the rendering resource

_drawPolygon(array $points, integer $color, boolean $filled = true
Inherited

Parameters

$points

array

$color

integer

$filled

boolean

Draw a polygon in the svg resource

_drawText(string $text, float $size, array $position, string $font, integer $color, string $alignment = 'center', float|integer $orientation = 0
inherited_from \Zend_Barcode_Renderer_RendererAbstract::_drawText()

Parameters

$text

string

$size

float

$position

array

$font

string

$color

integer

$alignment

string

$orientation

floatinteger

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
Inherited

Parameters

$text

string

$size

float

$position

array

$font

string

$color

integer

$alignment

string

$orientation

floatinteger

Initialize the image resource

_initRenderer() : void
inherited_from \Zend_Barcode_Renderer_RendererAbstract::_initRenderer()

Initialize the rendering resource

_initRenderer() : void
Inherited

_readRootElement()

_readRootElement() 

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

_drawInstructionList() 
Inherited

 Properties

 

Activate/Deactivate the automatic rendering of exception

$_automaticRenderError : boolean

Default

false
 

Barcode object

$_barcode : \Zend_Barcode_Object_ObjectAbstract

Default

 

Horizontal position of the barcode in the rendering resource

$_horizontalPosition : integer

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'
 

Resource for the image

$_resource : \DOMDocument

Default

null
inherited_from \Zend_Barcode_Renderer_RendererAbstract::_resource
 

Drawing resource

$_resource 

Default

 

Root element of the XML structure

$_rootElement : \DOMElement

Default

null
 

Offset of the barcode from the top of the rendering resource

$_topOffset : integer

Default

0
 

Renderer type

$_type : string

Default

null
 

Height of the rendered image wanted by user

$_userHeight : integer

Default

0
 

Width of the rendered image wanted by user

$_userWidth : integer

Default

0
 

Vertical position of the barcode in the rendering resource

$_verticalPosition : integer

Default

'top'