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-2014 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-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Properties

>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 $_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

Methods

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_checkDimensions() : void

Check barcode dimensions

Throws
ExceptionDescription
\Zend_Barcode_Renderer_Exception
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
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 | int $orientation = 0) : void

Draw a polygon in the svg resource

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

Initialize the image resource

methodprotected_readRootElement() : void

methodpublicdraw() : mixed

Draw the barcode in the rendering resource

Returns
TypeDescription
mixed
methodpublicgetHeight() : int

Get barcode height

Returns
TypeDescription
int
methodpublicgetWidth() : int

Get barcode width

Returns
TypeDescription
int
methodpublicrender() : mixed

Draw and render the barcode with correct headers

Returns
TypeDescription
mixed
methodpublicsetHeight(null | integer $value) : \Zend_Image_Barcode_Abstract

Set height of the result image

Parameters
NameTypeDescription
$valuenull | integer
Returns
TypeDescription
\Zend_Image_Barcode_Abstract
Throws
ExceptionDescription
\Zend_Barcode_Renderer_Exception
methodpublicsetResource( $svg) : \Zend_Barcode_Renderer

Set an image resource to draw the barcode inside

Parameters
NameTypeDescription
$svg
Returns
TypeDescription
\Zend_Barcode_Renderer
Throws
ExceptionDescription
\Zend_Barcode_Renderer_Exception
methodpublicsetWidth(mixed $value) : \Zend_Barcode_Renderer_Svg

Set barcode width

Parameters
NameTypeDescription
$valuemixed
Returns
TypeDescription
\Zend_Barcode_Renderer_Svg
Throws
ExceptionDescription
\Zend_Barcode_Renderer_Exception
Details
Fluent
This method is part of a fluent interface and will return the same instance  
Documentation was generated by phpDocumentor 2.2.0 .