Barcode/Renderer/RendererAbstract.php
Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to [email protected] so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Barcode
- Subpackage
- Renderer
- Version
- $Id: RendererAbstract.php 24593 2012-01-05 20:35:02Z matthew $
\Zend_Barcode_Renderer_RendererAbstract
Class for rendering the barcode
- Children
- \Zend_Barcode_Renderer_Pdf
- \Zend_Barcode_Renderer_Image
- \Zend_Barcode_Renderer_Svg
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties


boolean $_automaticRenderError = false
Activate/Deactivate the automatic rendering of exception
false
Details- Type
- boolean


integer $_horizontalPosition = 'left'
Horizontal position of the barcode in the rendering resource
'left'
Details- Type
- integer


integer $_leftOffset = 0
Offset of the barcode from the left of the rendering resource
0
Details- Type
- integer


string $_rendererNamespace = 'Zend_Barcode_Renderer'
Namespace of the renderer for autoloading
'Zend_Barcode_Renderer'
Details- Type
- string


integer $_topOffset = 0
Offset of the barcode from the top of the rendering resource
0
Details- Type
- integer
Methods


__construct(array | \Zend_Config $options = null) : void
Constructor
Name | Type | Description |
---|---|---|
$options | array | \Zend_Config |


_adjustPosition(float $supportHeight, float $supportWidth) : void
Calculate the left and top offset of the barcode in the rendering support
Name | Type | Description |
---|---|---|
$supportHeight | float | |
$supportWidth | float |


_checkBarcodeObject() : void
Check if a barcode object is correctly provided
Exception | Description |
---|---|
\Zend_Barcode_Renderer_Exception |


_drawInstructionList() : void
Sub process to draw the barcode instructions Needed by the automatic error rendering


_drawPolygon(array $points, integer $color, boolean $filled = true) : void
Draw a polygon in the rendering resource
Name | Type | Description |
---|---|---|
$points | array | |
$color | integer | |
$filled | boolean |


_drawText(string $text, float $size, array $position, string $font, integer $color, string $alignment = 'center', float $orientation = 0) : void
Draw a polygon in the rendering resource
Name | Type | Description |
---|---|---|
$text | string | |
$size | float | |
$position | array | |
$font | string | |
$color | integer | |
$alignment | string | |
$orientation | float |


getAutomaticRenderError() : boolean
Retrieve the automatic rendering of exception
Type | Description |
---|---|
boolean |


getBarcode() : \Zend_Barcode_Object
Retrieve the barcode object
Type | Description |
---|---|
\Zend_Barcode_Object |


getHorizontalPosition() : string
Horizontal position of the barcode in the rendering resource
Type | Description |
---|---|
string |


getVerticalPosition() : string
Vertical position of the barcode in the rendering resource
Type | Description |
---|---|
string |


render() : mixed
Render the resource by sending headers and drawed resource
Type | Description |
---|---|
mixed |


setAutomaticRenderError(boolean $value) : void
Activate/Deactivate the automatic rendering of exception
Name | Type | Description |
---|---|---|
$value | boolean |


setBarcode(\Zend_Barcode_Object $barcode) : \Zend_Barcode_Renderer
Set the barcode object
Name | Type | Description |
---|---|---|
$barcode | \Zend_Barcode_Object |
Type | Description |
---|---|
\Zend_Barcode_Renderer |


setConfig(\Zend_Config $config) : \Zend_Renderer_Object
Set renderer state from config object
Name | Type | Description |
---|---|---|
$config | \Zend_Config |
Type | Description |
---|---|
\Zend_Renderer_Object |


setHorizontalPosition(string $value) : \Zend_Barcode_Renderer
Horizontal position of the barcode in the rendering resource
Name | Type | Description |
---|---|---|
$value | string |
Type | Description |
---|---|
\Zend_Barcode_Renderer |
Exception | Description |
---|---|
\Zend_Barcode_Renderer_Exception |


setLeftOffset(integer $value) : \Zend_Barcode_Renderer
Manually adjust left position
Name | Type | Description |
---|---|---|
$value | integer |
Type | Description |
---|---|
\Zend_Barcode_Renderer |
Exception | Description |
---|---|
\Zend_Barcode_Renderer_Exception |


setModuleSize(float $value) : \Zend_Barcode_Renderer
Set the size of a module
Name | Type | Description |
---|---|---|
$value | float |
Type | Description |
---|---|
\Zend_Barcode_Renderer |
Exception | Description |
---|---|
\Zend_Barcode_Renderer_Exception |


setOptions(array $options) : \Zend_Renderer_Object
Set renderer state from options array
Name | Type | Description |
---|---|---|
$options | array |
Type | Description |
---|---|
\Zend_Renderer_Object |


setRendererNamespace(string $namespace) : \Zend_Renderer_Object
Set renderer namespace for autoloading
Name | Type | Description |
---|---|---|
$namespace | string |
Type | Description |
---|---|
\Zend_Renderer_Object |


setTopOffset(integer $value) : \Zend_Barcode_Renderer
Manually adjust top position
Name | Type | Description |
---|---|---|
$value | integer |
Type | Description |
---|---|
\Zend_Barcode_Renderer |
Exception | Description |
---|---|
\Zend_Barcode_Renderer_Exception |


setVerticalPosition(string $value) : \Zend_Barcode_Renderer
Vertical position of the barcode in the rendering resource
Name | Type | Description |
---|---|---|
$value | string |
Type | Description |
---|---|
\Zend_Barcode_Renderer |
Exception | Description |
---|---|
\Zend_Barcode_Renderer_Exception |