Class for rendering the barcode as svg

 Methods

Constructor

__construct(array | \Traversable $options) 
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::__construct()

Parameters

$options

array\Traversable

Checking of parameters after all settings

checkParams() : bool
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::checkParams()

Returns

bool

Draw the barcode in the rendering resource

draw() : \DOMDocument

Retrieve the automatic rendering of exception

getAutomaticRenderError() : bool
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::getAutomaticRenderError()

Returns

bool

Retrieve the barcode object

getBarcode() : \Zend\Barcode\Object\ObjectInterface
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::getBarcode()

Returns

Get barcode height

getHeight() : int

Returns

int

Horizontal position of the barcode in the rendering resource

getHorizontalPosition() : string
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::getHorizontalPosition()

Returns

string

Retrieve vertical adjustment

getLeftOffset() : int
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::getLeftOffset()

Returns

int

Set the size of a module

getModuleSize() : float
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::getModuleSize()

Returns

float

Retrieve renderer namespace

getRendererNamespace() : string
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::getRendererNamespace()

Returns

string

Retrieve vertical adjustment

getTopOffset() : int
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::getTopOffset()

Returns

int

getTransparentBackground()

getTransparentBackground() : bool
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::getTransparentBackground()

Returns

bool

Retrieve renderer type

getType() : string
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::getType()

Returns

string

Vertical position of the barcode in the rendering resource

getVerticalPosition() : string
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::getVerticalPosition()

Returns

string

Get barcode width

getWidth() : int

Returns

int

Draw and render the barcode with correct headers

render() : mixed

Returns

mixed

Activate/Deactivate the automatic rendering of exception

setAutomaticRenderError(bool $value) : \Zend\Barcode\Renderer\AbstractRenderer
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::setAutomaticRenderError()

Parameters

$value

bool

Returns

Set the barcode object

setBarcode(\Zend\Barcode\Object\ObjectInterface $barcode) : \Zend\Barcode\Renderer\AbstractRenderer
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::setBarcode()

Parameters

Returns

Set height of the result image

setHeight(null | int $value) : \Zend\Barcode\Renderer\Svg

Horizontal position of the barcode in the rendering resource

setHorizontalPosition(string $value) : \Zend\Barcode\Renderer\AbstractRenderer
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::setHorizontalPosition()

Parameters

$value

string

Exceptions

\Zend\Barcode\Renderer\Exception\UnexpectedValueException

Returns

Manually adjust left position

setLeftOffset(int $value) : \Zend\Barcode\Renderer\AbstractRenderer
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::setLeftOffset()

Parameters

$value

int

Exceptions

\Zend\Barcode\Renderer\Exception\OutOfRangeException

Returns

Set the size of a module

setModuleSize(float $value) : \Zend\Barcode\Renderer\AbstractRenderer
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::setModuleSize()

Parameters

$value

float

Exceptions

\Zend\Barcode\Renderer\Exception\OutOfRangeException

Returns

Set renderer state from options array

setOptions(array $options) : \Zend\Barcode\Renderer\AbstractRenderer
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::setOptions()

Parameters

$options

array

Returns

Set renderer namespace for autoloading

setRendererNamespace(string $namespace) : \Zend\Barcode\Renderer\AbstractRenderer
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::setRendererNamespace()

Parameters

$namespace

string

Returns

Set an image resource to draw the barcode inside

setResource(\DOMDocument $svg) : \Zend\Barcode\Renderer\Svg

Parameters

Returns

Manually adjust top position

setTopOffset(int $value) : \Zend\Barcode\Renderer\AbstractRenderer
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::setTopOffset()

Parameters

$value

int

Exceptions

\Zend\Barcode\Renderer\Exception\OutOfRangeException

Returns

Set whether background should be transparent Will work for SVG and Image (png and gif only)

setTransparentBackground($bool) : \Zend\Barcode\Renderer\$this
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::setTransparentBackground()

Parameters

$bool

Returns

\Zend\Barcode\Renderer\$this

Vertical position of the barcode in the rendering resource

setVerticalPosition(string $value) : \Zend\Barcode\Renderer\AbstractRenderer
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::setVerticalPosition()

Parameters

$value

string

Exceptions

\Zend\Barcode\Renderer\Exception\UnexpectedValueException

Returns

Set barcode width

setWidth(mixed $value) : \Zend\Barcode\Renderer\self

Parameters

$value

mixed

Exceptions

\Zend\Barcode\Renderer\Exception\OutOfRangeException

Returns

\Zend\Barcode\Renderer\self

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

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

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::adjustPosition()

Parameters

$supportHeight

float

$supportWidth

float

Append a new DOMElement to the root element

appendRootElement(string $tagName, array $attributes, string $textContent) 

Parameters

$tagName

string

$attributes

array

$textContent

string

Check if a barcode object is correctly provided

checkBarcodeObject() : void
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::checkBarcodeObject()

Exceptions

\Zend\Barcode\Renderer\Exception\RuntimeException

Check barcode dimensions

checkDimensions() : void

Check barcode parameters

checkSpecificParams() : void

Create DOMElement

createElement(string $tagName, array $attributes, string $textContent) : \DOMElement

Parameters

$tagName

string

$attributes

array

$textContent

string

Returns

Draw a polygon in the svg resource

drawPolygon(array $points, int $color, bool $filled) 

Parameters

$points

array

$color

int

$filled

bool

Draw a polygon in the svg resource

drawText(string $text, float $size, array $position, string $font, int $color, string $alignment, float $orientation) 

Parameters

$text

string

$size

float

$position

array

$font

string

$color

int

$alignment

string

$orientation

float

Initialize the image resource

initRenderer() : void

readRootElement()

readRootElement() 

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

drawInstructionList() 
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::drawInstructionList()

 Properties

 

Activate/Deactivate the automatic rendering of exception

$automaticRenderError : bool
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::$$automaticRenderError
 

Barcode object

$barcode : \Zend\Barcode\Object\ObjectInterface
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::$$barcode
 

Flag to determime if drawPolygon has been run once already

$drawPolygonExecuted : bool

 

Horizontal position of the barcode in the rendering resource

$horizontalPosition : int
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::$$horizontalPosition
 

Offset of the barcode from the left of the rendering resource

$leftOffset : int
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::$$leftOffset
 

Module size rendering

$moduleSize : float
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::$$moduleSize
 

Namespace of the renderer for autoloading

$rendererNamespace : string
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::$$rendererNamespace
 

Resource for the image

$resource : \DOMDocument

 

Root element of the XML structure

$rootElement : \DOMElement

 

Offset of the barcode from the top of the rendering resource

$topOffset : int
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::$$topOffset
 

Show a transparent background

$transparentBackground : Boolean
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::$$transparentBackground
 

Renderer type

$type : string
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::$$type
 

Height of the rendered image wanted by user

$userHeight : int

 

Width of the rendered image wanted by user

$userWidth : int

 

Vertical position of the barcode in the rendering resource

$verticalPosition : int
Inherited

inherited_from \Zend\Barcode\Renderer\AbstractRenderer::$$verticalPosition