Class for rendering the barcode as image

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
inherited_from \Zend_Barcode_Renderer_RendererAbstract::__construct()

Parameters

$options

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

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 the image type to produce

getImageType() : string

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_Image
Inherited
fluent This method is part of a fluent interface and will return the same instance

Parameters

$value

boolean

Returns

\Zend_Barcode_Renderer_Image

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

Set the image type to produce (png, jpeg, gif)

setImageType(string $value) : \Zend_Barcode_RendererAbstract

Parameters

$value

string

Exceptions

\Zend_Barcode_Renderer_Exception

Returns

\Zend_Barcode_RendererAbstract

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($image) : \Zend_Barcode_Renderer

Parameters

$image

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_Image
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_Image

Set barcode width

setWidth(mixed $value) : \Zend_Barcode_Renderer_Image
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_Image

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

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

Draw a polygon in the image 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 image 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

Exceptions

\Zend_Barcode_Renderer_Exception

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()

Exceptions

\Zend_Barcode_Exception

Initialize the rendering resource

_initRenderer() : void
Inherited

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

_drawInstructionList() 
Inherited

 Properties

 

List of authorized output format

$_allowedImageType : array

Default

array('png', 'jpeg', 'gif')
 

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'
 

Resource for the background color of the image

$_imageBackgroundColor : integer

Default

null
 

Resource for the font and bars color of the image

$_imageForeColor : integer

Default

null
 

Image format

$_imageType : string

Default

'png'
 

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 : resource

Default

null
inherited_from \Zend_Barcode_Renderer_RendererAbstract::_resource
 

Drawing resource

$_resource 

Default

 

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'