Barcode/Renderer/Svg.php

Show: PublicProtectedPrivateinherited
Table of Contents
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 license@zend.com 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: Image.php 20366 2010-01-18 03:56:52Z ralph $  

\Zend_Barcode_Renderer_Svg

Package: Zend\Barcode
Class for rendering the barcode as svg
Parent(s)
\Zend_Barcode_Renderer_RendererAbstract
Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Properties

>VPropertyprotectedboolean $_automaticRenderError = false
inherited
Activate/Deactivate the automatic rendering of exception
Inherited from: \Zend_Barcode_Renderer_RendererAbstract::$$_automaticRenderError
Default valuefalseDetails
Type
boolean
Inherited_from
\Zend_Barcode_Renderer_RendererAbstract::$$_automaticRenderError  
>VPropertyprotected\Zend_Barcode_Object_ObjectAbstract $_barcode
inherited
Barcode object
Inherited from: \Zend_Barcode_Renderer_RendererAbstract::$$_barcode
>VPropertyprotectedinteger $_horizontalPosition = 'left'
inherited
Horizontal position of the barcode in the rendering resource
Inherited from: \Zend_Barcode_Renderer_RendererAbstract::$$_horizontalPosition
Default value'left'Details
Type
integer
Inherited_from
\Zend_Barcode_Renderer_RendererAbstract::$$_horizontalPosition  
>VPropertyprotectedinteger $_leftOffset = 0
inherited
Offset of the barcode from the left of the rendering resource
Inherited from: \Zend_Barcode_Renderer_RendererAbstract::$$_leftOffset
Default value0Details
Type
integer
Inherited_from
\Zend_Barcode_Renderer_RendererAbstract::$$_leftOffset  
>VPropertyprotectedfloat $_moduleSize = 1
inherited
Module size rendering
Inherited from: \Zend_Barcode_Renderer_RendererAbstract::$$_moduleSize
Default value1Details
Type
float
Inherited_from
\Zend_Barcode_Renderer_RendererAbstract::$$_moduleSize  
>VPropertyprotectedstring $_rendererNamespace = 'Zend_Barcode_Renderer'
inherited
Namespace of the renderer for autoloading
Inherited from: \Zend_Barcode_Renderer_RendererAbstract::$$_rendererNamespace
Default value'Zend_Barcode_Renderer'Details
Type
string
Inherited_from
\Zend_Barcode_Renderer_RendererAbstract::$$_rendererNamespace  
>VPropertyprotected\DOMDocument $_resource = null
Resource for the image
Default valuenullDetails
Type
\DOMDocument
>VPropertyprotected\DOMElement $_rootElement = null
Root element of the XML structure
Default valuenullDetails
Type
\DOMElement
>VPropertyprotectedinteger $_topOffset = 0
inherited
Offset of the barcode from the top of the rendering resource
Inherited from: \Zend_Barcode_Renderer_RendererAbstract::$$_topOffset
Default value0Details
Type
integer
Inherited_from
\Zend_Barcode_Renderer_RendererAbstract::$$_topOffset  
>VPropertyprotectedstring $_type = null
inherited
Renderer type
Inherited from: \Zend_Barcode_Renderer_RendererAbstract::$$_type
Default valuenullDetails
Type
string
Inherited_from
\Zend_Barcode_Renderer_RendererAbstract::$$_type  
>VPropertyprotectedinteger $_userHeight = 0
Height of the rendered image wanted by user
Default value0Details
Type
integer
>VPropertyprotectedinteger $_userWidth = 0
Width of the rendered image wanted by user
Default value0Details
Type
integer
>VPropertyprotectedinteger $_verticalPosition = 'top'
inherited
Vertical position of the barcode in the rendering resource
Inherited from: \Zend_Barcode_Renderer_RendererAbstract::$$_verticalPosition
Default value'top'Details
Type
integer
Inherited_from
\Zend_Barcode_Renderer_RendererAbstract::$$_verticalPosition  

Methods

methodpublic__construct(array | \Zend_Config $options = null) : void
inherited

Constructor

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::__construct()
Parameters
NameTypeDescription
$optionsarray | \Zend_Config
methodprotected_adjustPosition(float $supportHeight, float $supportWidth) : void
inherited

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

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::_adjustPosition()
Parameters
NameTypeDescription
$supportHeightfloat
$supportWidthfloat
methodprotected_appendRootElement(string $tagName, array $attributes = array(), string $textContent = null) : void

Append a new DOMElement to the root element

Parameters
NameTypeDescription
$tagNamestring
$attributesarray
$textContentstring
methodprotected_checkBarcodeObject() : void
inherited

Check if a barcode object is correctly provided

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::_checkBarcodeObject()
Details
Throw
 
methodprotected_checkDimensions() : void

Check barcode dimensions

methodprotected_checkParams() : void

Check barcode parameters

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

Create DOMElement

Parameters
NameTypeDescription
$tagNamestring
$attributesarray
$textContentstring
Returns
TypeDescription
\DOMElement
methodprivate_drawInstructionList() : void
inherited

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

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::_drawInstructionList()
methodprotected_drawPolygon(array $points, integer $color, boolean $filled = true) : void

Draw a polygon in the svg resource

Parameters
NameTypeDescription
$pointsarray
$colorinteger
$filledboolean
methodprotected_drawText(string $text, float $size, array $position, string $font, integer $color, string $alignment = 'center', float $orientation = 0) : void

Draw a polygon in the svg resource

Parameters
NameTypeDescription
$textstring
$sizefloat
$positionarray
$fontstring
$colorinteger
$alignmentstring
$orientationfloat
methodprotected_initRenderer() : void

Initialize the image resource

methodprotected_readRootElement() : void

methodpubliccheckParams() : boolean
inherited

Checking of parameters after all settings

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::checkParams()
Returns
TypeDescription
boolean
methodpublicdraw() : mixed

Draw the barcode in the rendering resource

Returns
TypeDescription
mixed
methodpublicgetAutomaticRenderError() : boolean
inherited

Retrieve the automatic rendering of exception

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::getAutomaticRenderError()
Returns
TypeDescription
boolean
methodpublicgetBarcode() : \Zend_Barcode_Object
inherited

Retrieve the barcode object

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::getBarcode()
Returns
TypeDescription
\Zend_Barcode_Object
methodpublicgetHeight() : int

Get barcode height

Returns
TypeDescription
int
methodpublicgetHorizontalPosition() : string
inherited

Horizontal position of the barcode in the rendering resource

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::getHorizontalPosition()
Returns
TypeDescription
string
methodpublicgetLeftOffset() : integer
inherited

Retrieve vertical adjustment

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::getLeftOffset()
Returns
TypeDescription
integer
methodpublicgetModuleSize() : float
inherited

Set the size of a module

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::getModuleSize()
Returns
TypeDescription
float
methodpublicgetRendererNamespace() : string
inherited

Retrieve renderer namespace

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::getRendererNamespace()
Returns
TypeDescription
string
methodpublicgetTopOffset() : integer
inherited

Retrieve vertical adjustment

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::getTopOffset()
Returns
TypeDescription
integer
methodpublicgetType() : string
inherited

Retrieve renderer type

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::getType()
Returns
TypeDescription
string
methodpublicgetVerticalPosition() : string
inherited

Vertical position of the barcode in the rendering resource

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::getVerticalPosition()
Returns
TypeDescription
string
methodpublicgetWidth() : int

Get barcode width

Returns
TypeDescription
int
methodpublicrender() : mixed

Draw and render the barcode with correct headers

Returns
TypeDescription
mixed
methodpublicsetAutomaticRenderError(boolean $value) : void
inherited

Activate/Deactivate the automatic rendering of exception

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::setAutomaticRenderError()
Parameters
NameTypeDescription
$valueboolean
methodpublicsetBarcode(\Zend_Barcode_Object $barcode) : \Zend_Barcode_Renderer
inherited

Set the barcode object

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::setBarcode()
Parameters
NameTypeDescription
$barcode\Zend_Barcode_Object
Returns
TypeDescription
\Zend_Barcode_Renderer
methodpublicsetConfig(\Zend_Config $config) : \Zend_Renderer_Object
inherited

Set renderer state from config object

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::setConfig()
Parameters
NameTypeDescription
$config\Zend_Config
Returns
TypeDescription
\Zend_Renderer_Object
methodpublicsetHeight(null | integer $value) : \Zend_Image_Barcode_Abstract

Set height of the result image

Parameters
NameTypeDescription
$valuenull | integer
Returns
TypeDescription
\Zend_Image_Barcode_Abstract
Details
Throw
 
methodpublicsetHorizontalPosition(string $value) : \Zend_Barcode_Renderer
inherited

Horizontal position of the barcode in the rendering resource

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::setHorizontalPosition()
Parameters
NameTypeDescription
$valuestring
Returns
TypeDescription
\Zend_Barcode_Renderer
Details
Throw
 
methodpublicsetLeftOffset(integer $value) : \Zend_Barcode_Renderer
inherited

Manually adjust left position

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::setLeftOffset()
Parameters
NameTypeDescription
$valueinteger
Returns
TypeDescription
\Zend_Barcode_Renderer
Details
Throw
 
methodpublicsetModuleSize(float $value) : \Zend_Barcode_Renderer
inherited

Set the size of a module

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::setModuleSize()
Parameters
NameTypeDescription
$valuefloat
Returns
TypeDescription
\Zend_Barcode_Renderer
Details
Throw
 
methodpublicsetOptions(array $options) : \Zend_Renderer_Object
inherited

Set renderer state from options array

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::setOptions()
Parameters
NameTypeDescription
$optionsarray
Returns
TypeDescription
\Zend_Renderer_Object
methodpublicsetRendererNamespace(string $namespace) : \Zend_Renderer_Object
inherited

Set renderer namespace for autoloading

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::setRendererNamespace()
Parameters
NameTypeDescription
$namespacestring
Returns
TypeDescription
\Zend_Renderer_Object
methodpublicsetResource( $svg) : \Zend_Barcode_Renderer

Set an image resource to draw the barcode inside

Parameters
NameTypeDescription
$svg
Returns
TypeDescription
\Zend_Barcode_Renderer
Details
Throw
 
methodpublicsetTopOffset(integer $value) : \Zend_Barcode_Renderer
inherited

Manually adjust top position

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::setTopOffset()
Parameters
NameTypeDescription
$valueinteger
Returns
TypeDescription
\Zend_Barcode_Renderer
Details
Throw
 
methodpublicsetVerticalPosition(string $value) : \Zend_Barcode_Renderer
inherited

Vertical position of the barcode in the rendering resource

Inherited from: \Zend_Barcode_Renderer_RendererAbstract::setVerticalPosition()
Parameters
NameTypeDescription
$valuestring
Returns
TypeDescription
\Zend_Barcode_Renderer
Details
Throw
 
methodpublicsetWidth(mixed $value) : void

Set barcode width

Parameters
NameTypeDescription
$valuemixed
Documentation was generated by phpDocumentor 2.0.0a12.