Class for rendering the barcode as image

 Methods

Constructor

__construct(array | \Traversable $options) 

Parameters

$options

array\Traversable

Exceptions

\Zend\Barcode\Exception\RendererCreationException

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() : mixed
Inherited

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

Exceptions

\Zend\Barcode\Exception\ExceptionInterface

Returns

mixed

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

getImageType() : string

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\Image

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

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

setImageType(string $value) : \Zend\Barcode\Renderer\Image

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(resource $image) : \Zend\Barcode\Renderer\Image

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

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

Draw a polygon in the image resource

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

Parameters

$points

array

$color

int

$filled

bool

Draw a polygon in the image resource

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

Parameters

$text

string

$size

float

$position

array

$font

string

$color

int

$alignment

string

$orientation

floatint

Exceptions

\Zend\Barcode\Renderer\Exception\RuntimeException

Initialize the image resource

initRenderer() : void

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

drawInstructionList() 
Inherited

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

 Properties

 

List of authorized output format

$allowedImageType : array

 

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
 

Horizontal position of the barcode in the rendering resource

$horizontalPosition : string
Inherited

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

Resource for the background color of the image

$imageBackgroundColor : int

 

Resource for the font and bars color of the image

$imageForeColor : int

 

Image format

$imageType : string

 

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

 

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 : string
Inherited

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